# Why is the variance of my random effect negative?

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

-

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.