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