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

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

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