BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
Marjolein
Obsidian | Level 7

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!

 

1 ACCEPTED SOLUTION

Accepted Solutions
JacobSimonsen
Barite | Level 11

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. 

View solution in original post

5 REPLIES 5
Reeza
Super User

Please post your log including code submitted.  

JacobSimonsen
Barite | Level 11

The code is correct. The error message must be because you have time values that are either zero or negative.

Marjolein
Obsidian | Level 7

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?

JacobSimonsen
Barite | Level 11

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. 

Marjolein
Obsidian | Level 7

Yes, now it runs! Perfect! Thanks a lot! 😄

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
  • 5 replies
  • 1642 views
  • 1 like
  • 3 in conversation