1. Home
  2. RSTEST procedure

RSTEST procedure

Compares groups of right-censored survival data by nonparametric tests (D.A. Murray).

Options

PRINT = string token Controls printed output (test); default test
METHOD = string tokens Types of test required (logrank, breslow, petoprentice, taroneware); default logr, bres, peto, taro
BLOCKS = factor Factor specifying groupings for a stratified test; default * i.e. none

Parameters

TIMES = variates Observed timepoints
CENSORED = variates Variate specifying whether the corresponding element of TIMES is censored (1) or not (0)
GROUPS = factors Factor specifying the different groups
TESTS = pointers Pointer to variates (length 3) to save test statistic, d.f. and probability value for each chosen method

Description

RSTEST compares two or more groups of right-censored survival data using nonparametric tests. The type of test to be performed is specified by the METHOD option, with settings logrank, breslow, petoprentice and taroneware.

The observed timepoints or the timepoints at which censoring took place are specified using the TIMES parameter. The CENSORED parameter specifies a variate containing the value one if the corresponding element of TIMES is censored or zero if it was not. CENSORED can be omitted if there was no censoring. The groups to be compared are indicated using the GROUPS parameter. The BLOCKS option can be used to specify a factor to indicate different groupings for a stratified test, for example these might represent different centres or laboratories.

The TESTS parameter allows the statistics to be saved in a pointer to a set of variates (length 3) for each of the chosen methods containing the statistic, its degrees of freedom and probability level. If you are saving the tests you may want to set option PRINT=* to stop them being printed.

Options: PRINT, METHOD, BLOCKS.

Parameters: TIMES, CENSORED, GROUPS, TESTS.

Method

The log-rank and Wilcoxon (Breslow) tests are calculated according to the method outlined in Chapter 2 of Collet (1994). The Wilcoxon (Peto-Prentice) and Tarone-Ware tests are evaluated using the method detailed in Section 11.1.2 of Collet (1994).

Action with RESTRICT

The input variates and factors may be restricted identically. The tests are based only on the units not excluded by the restriction.

Reference

Collett, D. (1994). Modelling Survival Data in Medical Research. Chapman & Hall, London.

See also

Procedures: KAPLANMEIER, RLIFETABLE, RPHFIT, RPROPORTIONAL, RSURVIVAL.

Commands for: Survival analysis.

Example

CAPTION  'RSTEST example',\
         !t('Survival times of melanoma patients in two treatment groups',\
         'stratified by age-group (Collet 1994, page 48).'); STYLE=meta,plain
VARIATE  [NVALUES=30] Day, Censor
READ     Day,Censor
19 0  24 1  8 0   17 1  17 1  34 1  34 1  4 0   17 1  10 0
5 0   27 1  21 1  18 1  16 1  7 0   12 1  24 0  8 0   8 1
8 0   11 1  23 1  12 1  15 1  8 1   8 1   25 1  8 0   11 1 :
FACTOR   [LEVELS=3;LABELS=!t('21_40','41_60','61_')] AgeGroup;\
         VALUES=!(6(1),3(2),2(3),9(1),7(2),3(3))
FACTOR   [LEVELS=2;LABELS=!t('BCG','c.parvum')] Treat;\
         VALUES=!(11(1),19(2))
RSTEST   Day; CENSORED=Censor; GROUPS=Treat
RSTEST   [METHOD=logrank; BLOCKS=AgeGroup] Day; CENSORED=Censor; GROUPS=Treat
Updated on March 5, 2019

Was this article helpful?