BookmarkSubscribeRSS Feed
DC21
Calcite | Level 5

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. 

 

1 REPLY 1
ballardw
Super User

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.

 

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

Register now!

What is ANOVA?

ANOVA, or Analysis Of Variance, is used to compare the averages or means of two or more populations to better understand how they differ. Watch this tutorial for more.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 1 reply
  • 1672 views
  • 0 likes
  • 2 in conversation