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! 😄
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!
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.