The SURVEYPHREG Procedure

Example 115.5 A Test of the Proportional Hazards Assumption by Using the Programming Statements

(View the complete code for this example.)

You can use programming statements in PROC SURVEYPHREG to create time-dependent covariates to test the proportional hazards assumption for complex survey data. Consider the data set mortality from Example 115.3. The data set contains 1,891 observations from the 1992 NHANES I Epidemiologic Followup study (NHEFS) vital and tracing status.

Suppose you want to fit a proportional hazards model to this data and construct a test for the proportional hazards assumption on gender. The following statements request a proportional hazards regression of age on gender and x, where the time-dependent covariate x is created using the programing statements. The explanatory variable x assumes the value of the time variable age for the male subgroup. The variable vitalstatus is the censor indicator, and a value of 1, 4, 5, or 6 indicates a censored observation. The WEIGHT statement specifies the sampling weight, and the CLASS statement specifies that gender is a classification variable.

proc surveyphreg data = mortality nomcar;
   class gender;
   strata varstrata;
   cluster varpsu;
   weight sweight;
   model age*vitalstatus(1 4 5 6) = gender x;
   x = age*(gender=1);
run;

Output 115.5.1 displays some summary information. The "Number of Observations," "Censored Summary," and "Weighted Censored Summary" tables are exactly the same as in the example discussed in Domain Analysis.

Output 115.5.1: Data Summary, Censored Summary, and Information about Variance Estimation

The SURVEYPHREG Procedure

Number of Observations Read1891
Number of Observations Used1891
Sum of Weights Read1.0298E8
Sum of Weights Used1.0298E8

Summary of the Number of Event and Censored
Values
TotalEventCensoredPercent
Censored
1891717117462.08

Summary of the Weighted Number of Event
and Censored Values
TotalEventCensoredPercent
Censored
1.0298E8276503487532832373.15

Variance Estimation
MethodTaylor Series
Missing ValuesNOMCAR


Output 115.5.2 displays the estimated regression coefficients and their standard errors. The variable gender has two levels, and only one level is estimable. By default, PROC SURVEYPHREG estimates the first level (GENDER 1) and assigns a zero value for the second level. The estimated regression coefficient is 1.61 with a standard error of 0.71. The estimated regression coefficient for x is –0.02 with a standard error of 0.01. The t statistic for x is –1.55 with a p-value of 0.13 on 33 degrees of freedom. This test suggests that an interaction between the time variable age and gender is not significant. Therefore, there is little evidence of an exponential trend over time in the hazard ratio for gender.

Output 115.5.2: Parameter Estimates

Analysis of Maximum Likelihood Estimates
ParameterDFEstimateStandard
Error
t ValuePr > |t|Hazard
Ratio
GENDER 1331.6055050.7090812.260.03034.980
GENDER 2330...1.000
x33-0.0156480.010079-1.550.13010.984