The psoriasis data set is used in this chapter. We present table 9.2 below. The rest of the chapter has been skipped for now. We will complete it as time permits.
Table 9.2, page 293
* AG model; proc sort data = psrecur; by id; run; data psrecur1; set psrecur; by id; time0 = lag(time2); if first.id then time0 = 0; run; ods select ParameterEstimates; proc phreg data = psrecur1 covs(aggregate); model (time0 time2)*status(0) = tape light yrspsor; id id; run;
The PHREG Procedure Analysis of Maximum Likelihood Estimates Parameter Standard StdErr Hazard Variable DF Estimate Error Ratio Chi-Square Pr > ChiSq Ratio TAPE 1 0.39008 0.12445 0.577 9.8243 0.0017 1.477 LIGHT 1 0.40134 0.12118 0.571 10.9691 0.0009 1.494 YRSPSOR 1 0.00899 0.00558 0.482 2.5972 0.1071 1.009
* PWP-CP model; data psrecur2; set psrecur; retain enum ; by id; time0 = lag(time2); if first.id then do; time0 = 0; enum = 1; end; else enum = enum + 1; run; ods select ParameterEstimates; proc phreg data = psrecur2 covs(aggregate); model (time0 time2)*status(0) = tape light yrspsor; strata enum; id id; run;
The PHREG Procedure Analysis of Maximum Likelihood Estimates Parameter Standard StdErr Hazard Variable DF Estimate Error Ratio Chi-Square Pr > ChiSq Ratio TAPE 1 0.83831 0.24985 1.012 11.2574 0.0008 2.312 LIGHT 1 1.11766 0.26807 0.992 17.3833 <.0001 3.058 YRSPSOR 1 0.02102 0.01366 1.044 2.3700 0.1237 1.021
* PWP-GT model; data psrecur3; set psrecur; retain enum; by id; zero_time = 0; lagtime = lag(time2); if first.id then do; time_diff= time2; enum = 1; end; else do; enum = enum + 1; time_diff = time2 - lagtime; end; run; ods select ParameterEstimates; proc phreg data = psrecur3 covs(aggregate); model (zero_time time_diff)*status(0) = tape light yrspsor; strata enum; id id; run;
The PHREG Procedure Analysis of Maximum Likelihood Estimates Parameter Standard StdErr Hazard Variable DF Estimate Error Ratio Chi-Square Pr > ChiSq Ratio TAPE 1 0.61630 0.24510 1.055 6.3226 0.0119 1.852 LIGHT 1 0.81123 0.22350 0.964 13.1741 0.0003 2.251 YRSPSOR 1 0.01583 0.01234 0.974 1.6454 0.1996 1.016
*WLW; data psrecur4; set psrecur2; retain new_enum; by id; if first.id then new_enum = 1; else new_enum = new_enum + 1; if last.id then do; output; if enum < 4 then do i = 1 to 4-enum; new_enum= new_enum + 1; output; end; end; if ~last.id then output; drop enum; run; ods select ParameterEstimates; proc phreg data = psrecur4 covs(aggregate); model time2*status(0) = tape light yrspsor; strata new_enum; run;
The PHREG Procedure Analysis of Maximum Likelihood Estimates Parameter Standard StdErr Hazard Variable DF Estimate Error Ratio Chi-Square Pr > ChiSq Ratio TAPE 1 1.02995 0.22369 0.920 21.2008 <.0001 2.801 LIGHT 1 1.54021 0.20916 0.825 54.2267 <.0001 4.666 YRSPSOR 1 0.02778 0.01267 0.940 4.8074 0.0283 1.028
*TT-R; ods select ParameterEstimates; proc phreg data = psrecur3 covs(aggregate); model time2*status(0) = tape light yrspsor; strata enum; run;
The PHREG Procedure Analysis of Maximum Likelihood Estimates Parameter Standard StdErr Hazard Variable DF Estimate Error Ratio Chi-Square Pr > ChiSq Ratio TAPE 1 0.95533 0.22480 0.920 18.0593 <.0001 2.600 LIGHT 1 1.44791 0.20670 0.808 49.0689 <.0001 4.254 YRSPSOR 1 0.02581 0.01231 0.925 4.3962 0.0360 1.026