BookmarkSubscribeRSS Feed
LarissaW
Obsidian | Level 7
Hi guys, I would like to calculate p trends for my main exposures: cig, pipe and nass. They were originally numeric variables. I tried to use the numeric version in the Cox model but the result is either blank or "0". Then I tried to categorize these exposures into 4 levels, and I used the code below to calculate the trend, but SAS gave me this feedback. The instruction I used said there is a "ptrend" option in the Phreg function but when I entered it didn't turn blue as a valid option. Did anyone know how to fix the problem or how to calculate the p trend in the multivariable Cox model? Thank you.

 73         proc phreg data=liverfp;
 74         class cigd(ref='0') nassd(ref='0') piped(ref='0') everopi(ref='0')
 75                Aspirin(ref='2') HCVAb(ref='0')
 76          HBSAg(ref='0')  DLiver(ref='2') Diab(ref='2') ALC(ref='2')
 77           / param=ref;
 78         model length*caseco(0,2)= cigd piped nassd everopi HBSAg HCVAb
 79               DLiver Aspirin Diab Alc
 80              / risklimits ties=efron ptrend;
                                         ______
                                         22
                                         202
 ERROR 22-322: Syntax error, expecting one of the following: ;, ABSFCONV, ALPHA, BEST, CORRB, COVB, DETAILS, ENTRYTIME, FAILCODE, 
               FCONV, FIRTH, GCONV, HIERARCHY, INCLUDE, INITIAL, ITPRINT, MAXITER, MAXSTEP, NODESIGNPRINT, NODP, NODUMMY, 
               NODUMMYPRINT, NOFIT, OFFSET, PLCONV, RIDGING, RISKLIMITS, ROCLABEL, SELECTION, SEQUENTIAL, SINGULAR, SLENTRY, SLSTAY, 
               START, STOP, STOPRES, TIES, TYPE3, XCONV.  
 ERROR 202-322: The option or parameter is not recognized and will be ignored.
 81         strata age1 gender ethnicity;
 82         run;

 

sas-innovate-2024.png

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

Register now!

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 0 replies
  • 315 views
  • 0 likes
  • 1 in conversation