SAS Code for Residual Analysis and Proportional Hazard Assumption of Cox Model

SAS Code for Residual Analysis and Proportional Hazard Assumption of Cox Model

<p>BSTA 6652 Survival Analysis Semiparametric Method-2</p><p>SAS Code for residual analysis and proportional hazard assumption of Cox model</p><p>/* Cox regression model */ /* Data described in Chapter 3 of P. Allison, "Survival Analysis Using the SAS System." */ data recidall; input week arrest fin age race wexp mar paro prio educ emp1-emp52; cards; 20 … 1 ; data recid; set recidall; drop emp1-emp52; run;</p><p>/* residual analysis: Deviance & martingale residuals */ proc phreg data=recid; model week*arrest(0)=fin age prio/ties=exact covb; output out=c xbeta=risk_score resdev=dev resmart=mart; run; proc loess data=c; model mart=age; run;</p><p>/* exercise: do martingale plot for prio */ proc gplot data=c; title 'Deviance Residual Plot'; symbol value=dot i=none; plot dev*risk_score; run;</p><p>/* checking proportional hazard assumption */ /* wtressch gives scaled Sch. residual while ressch gives un-scaled one */ proc phreg data=recid; model week*arrest(0)=fin age prio/ ties=efron; output out=b wtressch=wtschfin wtschage wtschprio; run; proc gplot data=b; plot wtschfin*week wtschage*week wtschprio*week; symbol value=dot i=none; run; data nonprop; set b; lweek=log(week); week2=week**2; run; proc corr; var week lweek week2 wtschfin wtschage wtschprio; run;</p><p>1 BSTA 6652 Survival Analysis Semiparametric Method-2</p><p>SAS Output</p><p>2 BSTA 6652 Survival Analysis Semiparametric Method-2</p><p>Pearson Correlation Coefficients Prob > |r| under H0: Rho=0 Number of Observations week lweek week2 wtschfin wtschage wtschprio wtschfin 0.00842 0.05028 -0.00099 1.00000 -0.21967 -0.16399 Standardized 0.9292 0.5953 0.9917 0.0189 0.0813 Schoenfeld Residual 114 114 114 114 114 114 fin wtschage -0.22037 -0.24130 -0.19226 -0.21967 1.00000 -0.01809 Standardized 0.0185 0.0097 0.0404 0.0189 0.8485 Schoenfeld Residual 114 114 114 114 114 114 age wtschprio -0.07450 -0.00600 -0.09413 -0.16399 -0.01809 1.00000 Standardized 0.4308 0.9495 0.3191 0.0813 0.8485 Schoenfeld Residual 114 114 114 114 114 114 prio</p><p>3</p>

View Full Text

Details

  • File Type
    pdf
  • Upload Time
    -
  • Content Languages
    English
  • Upload User
    Anonymous/Not logged-in
  • File Pages
    3 Page
  • File Size
    -

Download

Channel Download Status
Express Download Enable

Copyright

We respect the copyrights and intellectual property rights of all users. All uploaded documents are either original works of the uploader or authorized works of the rightful owners.

  • Not to be reproduced or distributed without explicit permission.
  • Not used for commercial purposes outside of approved use cases.
  • Not used to infringe on the rights of the original creators.
  • If you believe any content infringes your copyright, please contact us immediately.

Support

For help with questions, suggestions, or problems, please contact us