BookmarkSubscribeRSS Feed
CarrieHowell
Calcite | Level 5

I hope I am posting in the right place, if not, please let me know.

I need to include time dependent covariates in a cox proportional hazards model using complex survey data and thus using PROC SURVEYPHREG. The SAS documentation shows that you can add them by using programming statements after the model statement (e.g. t_gender=gender*log(timescale used in model))  to create the variables and include the variables in the model. I have to use a domain statement to subset the population when I run the model; however, when I add in the time dependent covariates, SAS tells me the model converged in the log and gives me the first set of output tables but keeps running....after several attempts I believe SAS is not able to handle the domain statement AND the programming statements...has anyone ever done this successfully, and perhaps I am erring? Or does anyone know a workaround?

Thanks!

1 REPLY 1
ballardw
Super User

By any chance is any domain variable also in the model statement? If so try creating another variable with the same values to use in the domain statement. I'm not sure about Surveyphreg but the other survey procs don't like to have the domain variable involved in analysis.

If that isn't the case it might help to show the code used so folks can see what you did try.

SAS Innovate 2025: Call for Content

Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!

Submit your idea!

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
  • 1444 views
  • 0 likes
  • 2 in conversation