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

Hi,

I am running a logistic regression for survey data using proc surveylogistic. I wanted to save the model so that I could obtain predicted values for all subjects in a different dataset.

Here's my issue:

I'm using the store statement in proc surveylogistic to store the model info. I am also using the Domain statement in proc surveylogistic which gives me an overall analysis, an analysis for TAG = 0, and another analysis for TAG = 1.

If the model outputs 3 regression models, how does the store statement work? Does it store all 3 models? Just one? When I run a dataset through proc plm and use this model, can I specify which model I want it to use?

 

Here's an example of what my code looks like: 

proc surveylogistic data= dir.DF1;
WEIGHT WT ;
CLUSTER hosp;
STRATA stratum_key;
Class GainCAT3 (ref = "1")
/param = ref;
Model CSection(event='1') = GainCAT3 ;
Domain TAG;
store dir.Model;
run;


proc plm restore = dir.Model;
score data = NewData out = dir.pred predicted lcml uclm/ ilink;
run;

 

 

Any help is appreciated.

Thank you.

 

1 ACCEPTED SOLUTION

Accepted Solutions
Rick_SAS
SAS Super FREQ

There is only one model, which contains the parameter TAG. When you score the data, the procedure looks to see whether TAG=0 or 1 or 2 and uses the appropriate formula.

View solution in original post

1 REPLY 1
Rick_SAS
SAS Super FREQ

There is only one model, which contains the parameter TAG. When you score the data, the procedure looks to see whether TAG=0 or 1 or 2 and uses the appropriate formula.

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
  • 826 views
  • 1 like
  • 2 in conversation