Programming the statistical procedures from SAS

Time dependent covariates using PROC SURVEYPHREG in SAS when you are also using a domain statement

Reply
N/A
Posts: 1

Time dependent covariates using PROC SURVEYPHREG in SAS when you are also using a domain statement

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!

Super User
Posts: 10,816

Re: Time dependent covariates using PROC SURVEYPHREG in SAS when you are also using a domain statement

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.

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