Recall the breast cancer data in the example in the section Getting Started: ICLIFETEST Procedure. The following statements perform the generalized log-rank test to compare the survival distributions between two treatments
by using Finkelstein’s weights and save the corresponding scores to a SAS data set named Out
:
proc iclifetest data=bcs impute(seed=123); time (ltime,rtime); test trt/weight=finkelstein outscore=out; run;
Fay (1999) describes how to perform permutation tests by using these generated scores. PROC NPAR1WAY can do such tests and compute p-values based on normal theory approximation or Monte Carlo simulation. You need to specify the input data and specify SCORES=DATA, as follows:
proc npar1way data=out scores=data; class trt; var score; exact scores=data / mc seed=1234; run;
The variable Trt
is specified in the CLASS statement so that permutations are done for the groups formed by different levels of the variable.
The MC option performs a Monte Carlo version of the permutation test and computes the p-values by using Monte Carlo samples. Output 62.4.1 shows the results from the test based on normal theory approximation.
Output 62.4.1: Asymptotic Permutation Test
Output 62.4.2 displays the p-values that are calculated from the Monte Carlo samples.
Output 62.4.2: Monte Carlo Permutation Test
Output 62.4.3 displays the results of the generalized log-rank statistics from using Finkelstein’s weights. As you can see, it matches the two-sample test statistic of the permutation test.
Output 62.4.3: Generalized Log-Rank Statistics Using Finkelstein’s Weights