2

I'm attempting to conduct a simple one-way random-effects ANOVA in SAS. I want to know if the population variance is significantly different than zero or not.

On UCLA's idre site, they state to use PROC MIXED as follows:

proc mixed data = in.hsb12 covtest noclprint;
   class school;
   model mathach = / solution;
   random intercept / subject = school;
run;

This makes sense to me given my previous experience with using PROC MIXED.

However, in the text Biostatistical Design and Analysis Using R by Murray Logan, he says for a one-way ANOVA, fixed and random effects are not distinguished and conducts (in R) a "standard" one-way ANOVA even though he's testing the variance, not the means. I've found that in SAS, his R procedure is equivalent to using any of the following:

  1. PROC ANOVA
  2. PROC GLM (same as ANOVA, but with GLM in place of ANOVA)
  3. PROC GLM with RANDOM statement

The p-values from the above three models are the same, but differ from the PROC MIXED model used by UCLA. For my data, it's a difference of p=0.2508 and p=0.3138. Although conclusions don't change in this instance, I'm not really comfortable with this difference.

Can anyone give advice on which one is more appropriate and also why there is this difference?

Meg
  • 696
  • 1
  • 7
  • 20

1 Answers1

1

For your model, the difference between PROC ANOVA and PROC MIXED is only due to numerical noise(REML estimator of PROC MIXED). However, the p-values mentioned in your question correspond to the different tests. In order to get the F value using the output of COVTEST in PROC MIXED, you need to recalculate MS_groups taking into account the unequal sample sizes (either manually as explained on p.231 of http://bio.classes.ucsc.edu/bio286/MIcksBookPDFs/QK08.PDF, or just using PROC MIXED with the same fixed model spec as in PROC ANOVA). This paper (http://isites.harvard.edu/fs/docs/icb.topic1140782.files/S98.pdf) provides some examples of used of PROC MIXED in addition to SAS manual.

Kostya
  • 1,552
  • 1
  • 10
  • 16
  • Very helpful, thank you. I will have to find some time to read through those references to understand why PROC MIXED can't handle unbalanced data, but PROC ANOVA and GLM are fine. – Meg Nov 23 '14 at 15:12