BookmarkSubscribeRSS Feed
xuyi
Fluorite | Level 6

Hi, I am running a GLIMMIX to predict the probability of preterm baby birth. Each mom can have multiple births in the dataset, so mom’s medical record number (mrn) was set as random effect in the model. The outcome variable (gestational_weeks_lt37) was whether baby was born less than 37 weeks (preterm, event=1). I'm interested in variation among mom’s age categories. My model is like this:

ods output LSmeans=meansAge4;

proc glimmix data=ptb2_final method=laplace;

 class mom_mrn age_cat4 (ref='3');

 model gestational_weeks_lt37(event='1')=age_cat4/dist=binary link=logit solution oddsratio;

 random intercept/subject=mom_mrn;

lsmeans age_cat4/cl ilink;

run;

I would like to get the probability of preterm in each mom’s age category relative to the reference age group. The overall outcome variable by frequencies for preterm was 10.9%, and in the 4 groups was from 9.6% to 21.8%. I expected the probabilities from the model are close to 10%, so the lsmeans should be around 0.1. However, I got the intercept as -11.11, so when I calculate the probabilities, they are all close to 0.

xuyi_0-1719867152861.png

Why are the coefficients so low? What's wrong with my codes?
Thanks so much in advance for your help.

Yinghui

4 REPLIES 4
PaigeMiller
Diamond | Level 26

Maybe you didn't do anything wrong.

Maybe the model coefficients should be low, if the effect of agecat4 is low.

--
Paige Miller
xuyi
Fluorite | Level 6

The age_cat4 coefficient shouldn't be low. By proc freq, the percent of preterm birth was 21.8%, 11.0%, 9.6% and 17.6% in age_cat1, age_cat2, age_cat3, and age_cat4, respectively. 

 

Thank you,

 

Yinghui

sbxkoenk
SAS Super FREQ

How do you calculate the predicted probabilities of preterm baby birth?

My recommendation is that you use the STORE statement in PROC GLMIMMIX to save the elements of the model and then use Proc PLM to score data (using the stored model).

 

Good luck,

Koen

xuyi
Fluorite | Level 6

As indicated in the codes, the predicted probabilities were calculated using LSmeans/ilink.

 

Thanks,

 

Yinghui

sas-innovate-wordmark-2025-midnight.png

Register Today!

Join us for SAS Innovate 2025, our biggest and most exciting global event of the year, in Orlando, FL, from May 6-9. Sign up by March 14 for just $795.


Register now!

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 4 replies
  • 607 views
  • 0 likes
  • 3 in conversation