turn on suggestions

Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.

Showing results for

Find a Community

- Home
- /
- Analytics
- /
- Stat Procs
- /
- PROC NESTED VS. PROC VARCOMP / MIXED

Topic Options

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

11-15-2015 08:27 AM

Hello all,

I have lab results and I want to do variance analysis as a part of an R&R analysis. My main interest is the variance components, i.e., what is the variance associated with each factor and what is the percentage of each factor out of the total variability. I have a continuous variable Y and 4 factors: X1, X2, X3 and X4.

I tried 3 different PROC's for this analysis: MIXED, VARCOMP and NESTED. MIXED and VARCOMP gave me identical results, while NESTED was different. In the results of NESTED, I got for the total variance, the exact observed variance of the entire dataset, while in MIXED or VARCOMP, the total variance was higher by 10 (65 instead of 55) from the observed variance.

One of my factors is responsible for most of the variance, I know it as a fact (can be seen graphically). In NESTED is had 99.9% of the total variability, while in MIXED or VARCOMP less (still over 90%). On the surface, it looks like NESTED is better, since it actually gives me the observed variance. Anyone who will look at the output of MIXED or VARCOMP will wonder where the total variability came from. I tried this also in JMP (which is automatic), and it ran the variance component using a Bayesian estimation, and then the total variance was almost as the observed (2 units less).

Does anyone here known why I see such big differences between NESTED and VARCOMP (or MIXED) ? Which one should I go with ?

Thank you in advance.

My code is:

```
proc varcomp method=reml data=RR;
class X1 X2 X3 X4;
model Y=X1 X2(X1) X3(X1 X2) X4(X1 X2 X3) / fixed=0;
run;
proc nested data=RR;
class X1 X2 X3 X4;
var Y;
run;
```

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

11-15-2015 09:16 AM

You should not expect these two methods to produce identical results.

PROC NESTED uses the ANOVA sums of squares breakdown of variance, PROC VARCOMP uses REML (Restricted Maximum Likelihood), and these will not give the same answers.

The ANOVA sums of squares method can produce negative variance estimates, while (Restricted) Maximum Likelihood will not produce negative variance estimates.

If you have fixed factors in your design, REML will probably be better, but its really not as simple as that.