BookmarkSubscribeRSS Feed
MadsR
Calcite | Level 5

I am trying to compare concordance using SAS 9.4 on different models utlizing

 

proc phreg data=MyData concordance=uno(diff se seed=1234 iter=100);

model Time*Status(0)=V1 V2 V3;

roc 'V1 + V2' V1 + V2;

roc 'V2 + V3' V2 + V3;

run;

 

but would like to go the other way around it. I wanna add variables to my base model. I can't seem to figure out how to compare models by adding instead of removing variables from a base model. Say I want to see if adding a variable to traditional risk factors for stroke changes concordance and p-values. I would like to do something like this: 

 

proc phreg data=MyData concordance=uno(diff se seed=1234 iter=100);

model Time*Status(0)=V1 V2;

roc 'V1 V2 + V3' V1 V2 V3;

roc 'V1 V2 + V3 +V4' V1 V2 V3 V4;

run;

 

And so on. Trying this SAS hits me with "can't use variable that isn't in the original model"

 

Using the upper way leaves me comparing submodels to the largest model, instead of comparing the additive effect of new variables. 

 

Is there a way around this, or am I trying to do something that can't be done or is misunderstood in the first place?

1 REPLY 1
ChrisNZ
Tourmaline | Level 20

Changed title and moved to Statistical Procedures community to hopefully increase the chance of a response.

hackathon24-white-horiz.png

The 2025 SAS Hackathon Kicks Off on June 11!

Watch the live Hackathon Kickoff to get all the essential information about the SAS Hackathon—including how to join, how to participate, and expert tips for success.

YouTube LinkedIn

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
  • 1 reply
  • 2000 views
  • 0 likes
  • 2 in conversation