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

Hello,

 

I am using proc glimmix to run a multilevel logistic regression model. My goal is to somewhat artificially evaluate the variability in outcome attributed to the categorical variable anesthesiologist (anesth). The code for the model is:

 

proc glimmix data=hip method=Laplace;
class anesth surgeon sex admitCategory year;
model TXAstatus = age preopHb sex admitCategory Charlson_score year / solution dist=binomial link=logit;
random anesth surgeon;
run;

 

 To do so, I would like to generate predicted probabilities of TXA use holding everything constant except the anesthesiologist (determined based on the mean of continuous variables, and the most frequent observation in categorical variables). Ie,

 

sex="F";
age=68.1;
Charlson_score=0;
preopHb=130.37;
admitCategory="Elective";
year=2014;
surgeon="3103";

 

I know how to generate predicted probabilities with the output statement:

output out=glimmixout pred( blup ilink) = PredProbAnesthonly

 

Although can't figure out how to hold the other covariates constant. I've also considered lsmeans, although that doesn't work because anesth is a random effects variable and not incorporated into the model statement. 

 

Any advice would be very much appreciated!

 

Thanks,
Brett

1 ACCEPTED SOLUTION

Accepted Solutions
PaigeMiller
Diamond | Level 26

To do this, you can append some observations to the input data set named hip, with missing values for the response variable TXAstatus. These records that you append ought to have the 7 variables constant, and a changing value for anesth. Then run the model again with the OUTPUT statement, and predicted values for different anesthesiologist, with everything else held constant, will be written to the output data set GLIMMIXOUT.

 

There other ways to do this is using the STORE statement in PROC GLIMMIX followed by PROC PLM, examples are in the SAS documentation.

--
Paige Miller

View solution in original post

3 REPLIES 3
PaigeMiller
Diamond | Level 26

To do this, you can append some observations to the input data set named hip, with missing values for the response variable TXAstatus. These records that you append ought to have the 7 variables constant, and a changing value for anesth. Then run the model again with the OUTPUT statement, and predicted values for different anesthesiologist, with everything else held constant, will be written to the output data set GLIMMIXOUT.

 

There other ways to do this is using the STORE statement in PROC GLIMMIX followed by PROC PLM, examples are in the SAS documentation.

--
Paige Miller
bretthouston
Obsidian | Level 7
Thank-you, this is incredibly helpful. I really appreciate it!
bretthouston
Obsidian | Level 7

Hello,

 

I am using proc glimmix to run a multilevel logistic regression model. My goal is to somewhat artificially evaluate the variability in outcome attributed to the categorical variable anesthesiologist (anesth). The code for the model is:

 

proc glimmix data=hip method=Laplace;
class anesth surgeon sex admitCategory year;
model TXAstatus = age preopHb sex admitCategory Charlson_score year / solution dist=binomial link=logit;
random anesth surgeon;
run;

 

 To do so, I would like to generate predicted probabilities of TXA use holding everything constant except the anesthesiologist (determined based on the mean of continuous variables, and the most frequent observation in categorical variables). Ie,

 

sex="F";
age=68.1;
Charlson_score=0;
preopHb=130.37;
admitCategory="Elective";
year=2014;
surgeon="3103";

 

I know how to generate predicted probabilities with the output statement:

output out=glimmixout pred( blup ilink) = PredProbAnesthonly

 

Although can't figure out how to hold the other covariates constant. I've also considered lsmeans, although that doesn't work because anesth is a random effects variable and not incorporated into the model statement. 

 

Any advice would be very much appreciated!

 

Thanks,
Brett

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!

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