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
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.
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.
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
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!
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.