BookmarkSubscribeRSS Feed
ScottEDK
Calcite | Level 5

So I'm using GLIMMIX but I'm pretty sure this question can be applicable to other procedures that utilize LSMeans.

 

I have a model set up like so:

 

 

Class Druggroup Period Units;
Cases = Druggroup*Period + Druggroup*Units + ln_respondents;
Lsmeans Druggroup*Period / pdiff cl at ln_respondents = 0;

 

 

I want the LSMeans for the Druggroup*Period combinations AT (ln_respondents = 0) AND (Units = Reference category of Units).

 

Using AT ln_respondents = 0 is easy to do. However I cannot find out the way to have the LSMeans given for the REFERENCE category of Units. By default it looks like it gives the mean ACROSS the different categories.

 

I know this is possible to do with an ESTIMATE statement, but I am trying to make this code flexible (running many different models through it) so I was hoping to utilize LSMeans.

 

So, is it possible to get this info from LSMeans or am I barking up the wrong tree?

 

Thanks

1 REPLY 1
StatDave
SAS Super FREQ

As you describe it, you essentially want to get predicted means for several specified settings of all of your predictors. Save your fitted model by adding a STORE statement in GLIMMIX. You could then simply create a data set containing an observation for each of the settings for which you want estimated means, and then use PROC PLM to read the stored model information and specify a SCORE statement to obtain the predicted values for the data set you created. 

hackathon24-white-horiz.png

The 2025 SAS Hackathon has begun!

It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.

Latest Updates

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
  • 1613 views
  • 0 likes
  • 2 in conversation