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

I'm running a loglinear multiple regression model on episode level hospital claims data with a random effect for the subject IDs.

 

My regression formula has the form:

 

E[ln(Length of Stay)] = Beta* X_matrix + Gamma*(Subject ID)

 

My code:

proc glimmix data=sasdata.RPT_CTBH15041_CTPAR_CY2015_2017;
  class membno provnam grpnum sexcod racecd svccls;
  model total_los = provnam grpnum memage sexcod racecd svccls / cl e solution dist=lognormal;
  random int / subject=membno;
  lsmeans provnam / e cl ilink diff=anom;
  ods output ParameterEstimates=ParmEst;
  ods output LSMeans=MeanDiff;
run;

 

 

Question: Since I specified a loglinear model, not a GLM, does the "ilink" option in the lsmeans statement return the correct parameter estimates and standard errors of the mean LOS (not the median LOS) for the final model?

1 ACCEPTED SOLUTION

Accepted Solutions
sld
Rhodochrosite | Level 12 sld
Rhodochrosite | Level 12

When you choose DIST=LOGNORMAL, the GLIMMIX procedure models the logarithm of the response variable as a normal random variable, The GLIMMIX Procedure | Model options  Because the default link is the identity link, the ILINK option has no effect: the inverse-linked estimates are on the lognormal scale. You have to do the inverse-transformation yourself. 

View solution in original post

1 REPLY 1
sld
Rhodochrosite | Level 12 sld
Rhodochrosite | Level 12

When you choose DIST=LOGNORMAL, the GLIMMIX procedure models the logarithm of the response variable as a normal random variable, The GLIMMIX Procedure | Model options  Because the default link is the identity link, the ILINK option has no effect: the inverse-linked estimates are on the lognormal scale. You have to do the inverse-transformation yourself. 

SAS Innovate 2025: Call for Content

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!

Submit your idea!

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