Programming the statistical procedures from SAS

Checking Proportional Hazards Assumption with Age as Timescale

Reply
Frequent Learner
Posts: 1

Checking Proportional Hazards Assumption with Age as Timescale

Hi, 

 

I'm trying to fit a Cox regression model with age as the timescale, and I was wondering how you can check proportional hazards when this is the case, because the 'Assess option' doesn't work and my code to look at the Schoenfeld residuals isn't working either. I have code like this below:

 

proc phreg data=data_set;
class Drug (ref="None")/ desc;
model (age_in, age_out)*no_deaths(0) = drug / rl;
output out=test ressch=schres;
run;

 

proc sgplot data= test;
loess x=(age_out-age_in) y=schres/clm;
run;

 

If I make a variable age_out-age_in before, then that is essentially the same as follow-up days, but I want to use age because I have a strong suspicion that the rates converge with older age. Should I really be checking if the drug violates the proportional hazards by follow-up time with an age at baseline interaction? 

 

Any help much appreciated. 

Thanks. 

 

Grand Advisor
Posts: 10,026

Re: Checking Proportional Hazards Assumption with Age as Timescale

Please describe how "the 'Assess option' doesn't work and my code to look at the Schoenfeld residuals isn't working either";

 

Doesn't work is awful vague.

Are there errors in the log: Post the code and log in a code box opened with the {i} to maintain formatting of error messages.

No output? Post any log in a code box.

 

Unexpected output? Provide input data in the form of a dataset, the actual results and the expected results. Data should be in the form of a data step. Instructions here: https://communities.sas.com/t5/SAS-Communities-Library/How-to-create-a-data-step-version-of-your-dat... will show how to turn an existing SAS data set into data step code that can be pasted into a forum code box using the {i} icon or attached as text to show exactly what you have and that we can test code against.

 

Ask a Question
Discussion stats
  • 1 reply
  • 54 views
  • 0 likes
  • 2 in conversation