BookmarkSubscribeRSS Feed
☑ This topic is solved. Need further help from the community? Please sign in and ask a new question.
hikmatazizat
Calcite | Level 5

I tried to run a proc mixed on SAS ODA. before doing that I classified the variables into several categories. Then, I added interactions in the proc mixed model; however the LS means is always non-est. Does anyone know how to solve it?

 

1 ACCEPTED SOLUTION

Accepted Solutions
SteveDenham
Jade | Level 19

I'd like to modify @PaigeMiller 's response.  It is indeed due to empty cells, but generally it is the main effects that turn out to be nonestimable.  Interactions at the highest level should still be estimable.  To get around this, the LSMESTIMATE statement is a great tool.  Fit a "one-way" model such as:

 

model response = var_1*var_2*var_3...*var_n;
lsmeans var_1*var_2*var_3...*var_n / e;

From the coefficients produced by the /e option in the lsmeans statement, you can pull out the terms that need to be used to estimate main effects, and by judicious use of the JOINT option, you can get F tests.

 

SteveDenham

 

View solution in original post

3 REPLIES 3
PaigeMiller
Diamond | Level 26

Non-est indicates that some of the different cells that make up the interaction are empty (no data) and so LS Means interactions cannot be computed.

 

Example showing the number of data points in a cell:

 

                     DOG           CAT

MALE              7                  6

FEMALE         6                   0

 

Because FEMALE/CAT has zero observations, LSMEANS cannot estimate an interaction, and it shows this as Non-Est.

 

--
Paige Miller
SteveDenham
Jade | Level 19

I'd like to modify @PaigeMiller 's response.  It is indeed due to empty cells, but generally it is the main effects that turn out to be nonestimable.  Interactions at the highest level should still be estimable.  To get around this, the LSMESTIMATE statement is a great tool.  Fit a "one-way" model such as:

 

model response = var_1*var_2*var_3...*var_n;
lsmeans var_1*var_2*var_3...*var_n / e;

From the coefficients produced by the /e option in the lsmeans statement, you can pull out the terms that need to be used to estimate main effects, and by judicious use of the JOINT option, you can get F tests.

 

SteveDenham

 

PaigeMiller
Diamond | Level 26

 It is indeed due to empty cells, but generally it is the main effects that turn out to be nonestimable. 

 

Thanks for the clarification, @SteveDenham 

--
Paige Miller

SAS Innovate 2025: Register Now

Registration is now open for SAS Innovate 2025 , our biggest and most exciting global event of the year! Join us in Orlando, FL, May 6-9.
Sign up by Dec. 31 to get the 2024 rate of just $495.
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
  • 731 views
  • 0 likes
  • 3 in conversation