BookmarkSubscribeRSS Feed
cbatzi01
Calcite | Level 5

Hi, 

 

I am using PROC PHREG for time to event analysis.  I have a mix of continous and categorical variables to put into the model.  Can I put the categorical variables in the class statement of the model, and be OK or do I need to create dummy variables for each of them? 

 

Example:

 

proc phreg data=Tx1 outest=coxOutput covout plots=survival;
class DIAG_US product2 (ref='HMO') PlanGen (ref='Least Generous') rx_list4 (ref='mono') GDR_CD2 US_Cat(ref='no US') INDYR (ref='2004') ;
model bDMARDtm2*BLGC(0)=
rx_list4
US_Cat
DIAG_US
PlanGen
CIRASScore
OOP
ageonset
QCMI
QCMI6
Product2
INDYR
GDR_CD2
/ties=exact risklimits;
Format DIAG_US Diag_US_txt. product2 product2_txt. Fmastatus2 fmastatus2_txt. GDR_CD3 gdr_cd_txt. plangen plangen_txt. US_Cat US_Cat_txt. rx_list4 rx_List4_txt.;
run;

 

Thanks!
Chris

 

2 REPLIES 2
Reeza
Super User

Yes, you can use CLASS variables, but you should verify the parameterization method. Typically, PARAM=REF is the one used.

 

 

JacobSimonsen
Barite | Level 11

I agree with Reeza. Most likely, you should use the param=glm option in the class statement.

sas-innovate-2024.png

Today is the last day to save with the early bird rate! Register today for just $695 - $100 off the standard rate.

 

Plus, pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

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
  • 2 replies
  • 1353 views
  • 0 likes
  • 3 in conversation