Hi all,
I have a question regarding evaluating the PH assumption in a Cox model. I did this by introducing an interaction term for my exposure variable. My exposure variable is a categorical variable.
proc phreg data=mydata;
model time*censor(0)=exposure exposureT;
exposureT=exposure*(log(time));
RUN;
However, I get output but also an error in the log-window with:
An illegal argument is used in the function call in statement number 1 at line 1331 column 1.
What does this mean and does it influence my output?
Thanks!
I dont think it has to do with missing in covariates.
Try this variant:
proc phreg data=mydata(where=(time>0));
model time*censor(0)=exposure exposureT;
exposureT=exposure*(log(time));
RUN;
I made a typing mistake and have corrected this: it should be ">", not ">=", in the where statement.
Please post your log including code submitted.
The code is correct. The error message must be because you have time values that are either zero or negative.
There was one, and I took it out, but the error still persisted!
Is it maybe because it cannot handle missings in the other covariates? Or should that not matter?
I dont think it has to do with missing in covariates.
Try this variant:
proc phreg data=mydata(where=(time>0));
model time*censor(0)=exposure exposureT;
exposureT=exposure*(log(time));
RUN;
I made a typing mistake and have corrected this: it should be ">", not ">=", in the where statement.
Yes, now it runs! Perfect! Thanks a lot! 😄
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.
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.