2
$\begingroup$

I'm running an ANOVA model. I found my model does not meet constant variance assumption and corrected for that using a weighted ANOVA model. I don't think that changes anything..

After I run the weighted ANOVA model in SAS, I find one of my fixed effects is not significant with p-value = 0.3, but when I run LSMEANS on that same fixed effect, one of the levels shows statistical significance with p-value < .0001 compared to all the other levels.

What does that mean?

Edit: My data set is 1500 observations. It is unbalanced. I nested a variable. The variables in question are var1 and var2. Both are not significant in overall model. But LSMEANs says they are significant. Someone answered that to the response variable (score), these variables are not significant, but the means among each other are different?

My code:

proc glm data=weights2;
    weight wt;
    class var1 var2 var3 var4;
    model score = var1|var2|var4 @2 var1|var2|var3(var4) /solution;
    random var2 var1*var2 var2*var4 var2*var3(var4) var1*var2*var3(var4) /test;
    output out=myoutb r=res p=fitted;
    lsmeans var1*var2*var3(var4) /pdiff;
    lsmeans var3(var4) /pdiff;
    lsmeans var1 /pdiff;
    lsmeans var2 /pdiff;
    lsmeans var4 /pdiff;
run;
$\endgroup$
  • 1
    $\begingroup$ Are you sure your lsmeans statement is testing the same hypothesis as the t test? $\endgroup$ – probabilityislogic Mar 14 '12 at 10:28
  • $\begingroup$ Please post your SAS code. And the dataset if it is not too big. A possible explanation is that the data is unbalanced. $\endgroup$ – Stéphane Laurent Mar 14 '12 at 11:37
2
$\begingroup$

You should post your output but I'm guessing that the p-value you're looking at in the LSMEANS ouput is a test for whether or not the mean estimate is different from 0, not whether the group is different from another group (which is what the p-value = .3 is referring to).

To get the tests for which groups are different from each other you would want to add something similar to:

lsmeans var /diff adjust=tukey;

Edit:

If var2 is random why are you interested in the lsmeans? Also shouldn't var4 be random given var3 is nested within var4?

$\endgroup$
  • $\begingroup$ Thank you for all you answers. My data set is unbalanced. And my variable is nested.I forgot to mention these. $\endgroup$ – LilyZhang Mar 14 '12 at 18:06
  • 3
    $\begingroup$ The following document says "When an experiment is balanced, means and lsmeans agree. When data are unbalanced, however, there can be a large difference between a mean and an lsmean" public.iastate.edu/~dnett/S402/wlsmeans.pdf $\endgroup$ – Stéphane Laurent Mar 17 '12 at 15:58

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.