7

I have two variables, response and group, and I fitted the model in which group is a random effect.

proc mixed data=myData nobound;
   class group;
   model response =;
   random group;
run;

However, SAS returns a negative variance for the random effect...

I have noticed that, unexpectedly, the variability of response within group may be larger than the overall variability of response. I guess this is the reason why SAS returns a negative variance. Is it your opinion too? If so, how could this be seen from a mathematical point of view?

DATA

group   response
1   70.8
1   64.2
1   67.8
1   62
1   60 
1   66.6
1   67.8
1   60
1   70
1   63.3
1   37
1   53.8
2   82.7
2   65.5
2   67.7
2   51.6
2   53.8
2   64.3
2   72.4
2   48.3
2   54.8
2   64.8
3   88.5
3   69
3   60.9
3   71.4
3   52
3   58.3
3   63.6
3   51.9
3   52.4
3   52.2
3   65.4 
user7064
  • 2,213

3 Answers3

8

When you use ANOVA or MINQUE method of variance components estimation the estimate for the variance of a random factor may indeed occasionally be negative. There may be several causes, and it is not easy to detect the actual one. See Hocking R. R. (1985) The analysis of linear models. For example outliers and small sample size may be guilty. Try to delete a pair of extreme values and/or enlarge sample and see what you get.

Addition. Some of possible reasons:

  • Variation of obsevations may be too large for the sample size. Larger sample is needed.
  • Outliers
  • The true variance of the random factor is 0
  • Groups in the random or fixed factor is too unbalanced (unequal sized)
  • Variance components is not a right model for covariance structure for the data
ttnphns
  • 57,480
  • 49
  • 284
  • 501
  • Thx for the answer. Unfortunately, I do not have that book. Would it be possible to summarise the reasons mentioned there? Or would you have another reference? – user7064 Dec 10 '11 at 18:13
  • I don't have the book at hand either. I've made some extractions though, see added to the response. – ttnphns Dec 10 '11 at 19:09
  • 2
    Ok, thx ! Now, can one see that these reasons do lead to negative variance from a mathematical point of view? – user7064 Dec 10 '11 at 19:28
0

When you delete nobound from the code of SAS the variance of group=0. Also when you use the following code you can get the same results; PROC VARCOMP METHOD=REML; CLASSES group; MODEL response= group/FIXED=0; run; I think these results confirm that the variance of group =0 despite some methods gave negative value such as Mivque.

-1

When you doubled your data and perform the analysis you will get also negative value but less. For each increasing in data size the negative variance decrease. The second factor is the differences among three means of groups was close. These two factors are responsible about the negative value.