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?
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
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.
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
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
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!
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.