Programming the statistical procedures from SAS

Non-estimable lsmeans from glm

Reply
Regular Contributor
Posts: 226

Non-estimable lsmeans from glm

Hi everyone.

Could I please ask how can I resolve this?

I wish to get the lsmeans of Intervation but SAS gives me a warning saying 'WARNING: The ADJUST=DUNNETT p-values and confidence limits cannot be computed because the Dunnett-Hsu approximation did not converge. Try ADJUST=SIMULATE.' after I run the below glm model. I tried the ADJUST=SIMULATE but it gives me an error saying 'ERROR: Cannot compute simulated p-values with inestimable LSMEANS.'. I have about 60000 data points with up to 6 categories of Intervention and up to 7 categories of experimentNum. Their interaraction term is significant <0.0001.  There are zero observations for some combination groups of Intervention*experimentNum. However, the second lsmeans statement runs without problem.

Your help/insight is greatly appreciated!!

proc glm data=tmp order=internal plots=none;

class Intervention experimentNum;

model logconc=Intervention|experimentNum / solution e;

lsmeans Intervention / cl stderr e pdiff=control('No control');

lsmeans Intervention*experimentNum / cl pdiff stderr e om adjust=tukey;

run; quit;

Respected Advisor
Posts: 2,655

Re: Non-estimable lsmeans from glm

The main effect marginal means for intervention cannot be calculated, for as you point out, there are "empty cells".  The interaction LSmeans are presented, because that is the level of observation, essentially.  Note that certain combinations (those with N=0) do not appear.  The best way around this is to fit a means model (see Milliken and Johnson's Analysis of Messy Data).  To get what you need in GLM, you would have to construct ESTIMATE statements that combine the non-zero values to get main effect means, and then take differences.  Unfortunately, the ESTIMATE statement does not allow for multiple comparisons.

Enter PROC MIXED (or GLIMMIX), and the LSMESTIMATE statement.  This will enable calculation of main effect means and differences, in a way that control for multiple comparisons can be handled.  The statements may be complex, getting 42 possible interaction means combined as needed.

Steve Denham

Regular Contributor
Posts: 226

Re: Non-estimable lsmeans from glm

Thanks Steve for your reply! Much appreciated! I'll give it a go as you suggested.

Ask a Question
Discussion stats
  • 2 replies
  • 883 views
  • 1 like
  • 2 in conversation