The LIFEREG Procedure

Example 70.8 Model Postfitting Analysis

(View the complete code for this example.)

PROC LIFEREG enables you to make model-based inferences. This example uses the larynx cancer data (Klein and Moeschberger 1997) to illustrate usage of the LSMEANS and LSMESTIMATE statements for model postfitting analysis.

The survival time is modeled by a proportional odds model with two covariates: patient age and cancer stage (1, 2, 3, 4). The following statements use PROC LIFEREG to fit this model:

ods graphics on;

proc sort data=Larynx;
   by DESCENDING Stage;
run;

proc lifereg data=Larynx order=data;
   class Stage;
   model Time*Death(0) = Age Stage / dist = llogistic;
   lsmeans Stage / diff adjust=Sidak;
run;

The LSMEANS statement compares pairwise differences in survival times among the four different cancer stages, while adjusting for age. The ADJUST=SIDAK option uses the Sidak method to control the overall Type I error rate of these comparisons. Results are displayed in Output 70.8.1.

Output 70.8.1: LS-Means Differences between Disease Stages

The LIFEREG Procedure

Differences of Stage Least Squares Means
Adjustment for Multiple Comparisons: Sidak
Stage_StageEstimateStandard Errorz ValuePr > |z|Adj P
43-0.96040.4379-2.190.02830.1581
42-1.64040.4931-3.330.00090.0053
41-1.76610.4257-4.15<.00010.0002
32-0.68000.4316-1.580.11510.5199
31-0.80570.3539-2.280.02280.1292
21-0.12570.4152-0.300.76210.9998


All the LS-means differences and their significance are displayed by the mean-mean scatter plot in Output 70.8.2.

Output 70.8.2: Plot of Pairwise LS-Means Differences

Plot of Pairwise LS-Means Differences


Suppose you want to jointly test whether the effects of stages 2, 3, and 4 are different from stage 1. The following LSMESTIMATE statement contrasts the LS-means of stages 2, 3, and 4 against the LS-means of stage 1:

proc lifereg data=Larynx order=data;
   class Stage year;
   model Time*Death(0) = Age Stage / dist = llogistic;
   lsmestimate Stage 'Stage 4 vs 1' 1 0 0 -1,
                     'Stage 3 vs 1' 0 1 0 -1,
                     'Stage 2 vs 1' 0 0 1 -1 / cl adjust=Sidak;
run;

The CL option produces 95% confidence limits, including both unadjusted ones and those adjusted for multiple comparisons according to the ADJUST= option. Results are displayed in Output 70.8.3.

Output 70.8.3: Custom LS-Means Tests and Relative Odds

The LIFEREG Procedure

Least Squares Means Estimates
Adjustment for Multiplicity: Sidak
EffectLabelEstimateStandard Errorz ValuePr > |z|Adj PAlphaLowerUpperAdj LowerAdj Upper
StageStage 4 vs 1-1.76610.4257-4.15<.00010.00010.05-2.6004-0.9319-2.7825-0.7498
StageStage 3 vs 1-0.80570.3539-2.280.02280.06680.05-1.4993-0.1122-1.65070.03921
StageStage 2 vs 1-0.12570.4152-0.300.76210.98650.05-0.93950.6881-1.11710.8657


You can also perform the preceding analysis for a Bayesian model. The following statements generate posterior samples from a Bayesian model and request an LS-means analysis to compare the stage effects:

proc lifereg data=Larynx order=data;
   class Stage;
   model Time*Death(0) = Age Stage / dist = llogistic;
   bayes seed=100 nmc=500 nbi=500 diagnostic=none outpost=OOO;
   lsmeans Stage / diff exp;
   lsmestimate Stage 'Stage 4 vs 1' 1 0 0 -1,
                     'Stage 3 vs 1' 0 1 0 -1,
                     'Stage 2 vs 1' 0 0 1 -1
                        / cl plots=boxplot(orient=horizontal);
run;

Because no prior distributions for the regression coefficients were specified, the default uniform improper distributions shown in the "Uniform Prior for Regression Coefficients" table in Output 70.8.4 are used. The specified gamma prior for the scale parameter is also shown in Output 70.8.4.

Output 70.8.4: Model Parameter Priors

The LIFEREG Procedure
 
Bayesian Analysis

Uniform Prior for Regression
Coefficients
ParameterPrior
InterceptConstant
AgeConstant
Stage4Constant
Stage3Constant
Stage2Constant

Independent Prior Distributions for Model Parameters
ParameterPrior DistributionHyperparameters
ScaleGammaShape0.001Inverse Scale0.001


Under the Bayesian framework, the LS-means differences are treated as random variables for which posterior samples are readily available according to the linear relationship of LS-means and the regression coefficients. Output 70.8.5 lists the sample mean, standard deviation, and percentiles for each LS-means difference.

Output 70.8.5: LS-Means Differences between Disease Stages

Sample Differences of Stage Least Squares Means
Stage_StageNEstimateStandard DeviationPercentilesExponentiatedStandard Error of
Exponentiated
Percentiles for
Exponentiated
25th50th75th25th50th75th
43500-0.93070.4752-1.2743-0.9446-0.60860.44260.2326900.27960.38880.5441
42500-1.65910.5327-2.0161-1.6573-1.28610.21810.1158080.13320.19070.2763
41500-1.80010.4321-2.0951-1.7943-1.54910.18150.0829750.12310.16630.2124
32500-0.72840.4828-1.0488-0.7219-0.39750.54100.2687350.35040.48580.6720
31500-0.86940.3727-1.1199-0.8541-0.61490.44880.1680550.32630.42570.5407
21500-0.14100.4413-0.4126-0.14170.13630.95850.4623760.66190.86791.1461


The LSMESTIMATE statement produces summary statistics of the posterior samples for the specified LS-means contrasts. Results are presented in Output 70.8.6; they are very similar to the results based on maximum likelihood in Output 70.8.3.

Output 70.8.6: Summary Statistics of Custom LS-Means Differences

Sample Least Squares Means Estimates
EffectLabelNEstimateStandard DeviationPercentilesAlphaLower HPDUpper HPD
25th50th75th
StageStage 4 vs 1500-1.80010.4321-2.0951-1.7943-1.54910.05-2.6279-0.8897
StageStage 3 vs 1500-0.86940.3727-1.1199-0.8541-0.61490.05-1.6033-0.2031
StageStage 2 vs 1500-0.14100.4413-0.4126-0.14170.13630.05-1.14010.6252


The PLOTS= option uses ODS Graphics to display the Bayesian samples. A box plot is presented in Output 70.8.7.

Output 70.8.7: Box Plot of Sampled LS-Means Differences

Box Plot of Sampled LS-Means Differences