Stata The Stata listserver
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: RE: variance components from random-effects ANOVA? - no easy way


From   "Alex Gamma" <[email protected]>
To   <[email protected]>
Subject   st: RE: variance components from random-effects ANOVA? - no easy way
Date   Tue, 27 Jul 2004 14:09:31 +0200

Many thanks, Dave Airey and Yulia Marchenko, for your help, particularly for
the detailed examples Yulia included.

Summed up, it looks like none of the STATA commands will standardly output
estimates of variance components after two- or N-way random-effects ANOVA,
but one can use the code Yulia included for some designs. I wonder whether
there are any plans from StataCorp to include this feature in future
versions of the - anova - command, maybe in the form of a random() option to
define random effects?

Alex


--Dave wrote:
>
> I think you need to work these up from what's left behind by ANOVA, or
> see if another command does the trick (xtreg?, xtci?). I don't know if
> recent changes in what's left behind with ANOVA help this effort.
>
> May Boggess discussed code for intraclass correlations with > 1 random
> effect:
>
> http://www.stata.com/statalist/archive/2003-10/msg00804.html
>
> Here's a blurb from UNC:
>
> http://www.unc.edu/atn/statistical/applications/stata/statafaq.html#q21
>
> "Can Stata perform ANOVA with both random and fixed effects and
> estimate the variance components?
>
> Yes. Stata has several commands for doing most everything that SAS's
> proc GLM and proc Mixed. They include the -glm- and the -xt- set of
> commands. However, I don't believe Stata can estimate variance
> components in a linear model with more than two levels of random errors
> (which it can do with xtreg). Although Stata has a "general" ANOVA
> package, you have to tell it which are the appropriate error terms for
> testing various effects in complicated mixed and/or partially nested
> models. Even so, it won't provide estimates of the variance
> components."
>
> -Dave
>


--Yulia wrote:
>
> Here are a couple of examples of how to calculate variance components in
> using different types of designs. Unfortunately, we do have to compute the
> variance components ourselves.
>
> Before proceeding with the examples, note that in the 18may2004 update all
> sum of squares and corresponding to them degrees of freedom are in the
saved
> results after -anova-. Therefore, there is no need to run -test-
> after -anova- to get corresponding mean squared errors as we had to do
> previously.
>
> The examples come from the following two books:
> http://www.stata.com/bookstore/doe.html
> http://www.stata.com/bookstore/sped.html
>
>
> 1) Random effect with one-way factorial design:
> You can use STATA command -loneway- to get variance components estimates
> (example in [R] loneway p.338) for both balanced and unbalanced cases.
>
> 2) Random nested factors.
> Data is from Kuehl, "Design of Experiments", 2nd edition, p.243, example
7.3
>
[snip]


*
*   For searches and help try:
*   http://www.stata.com/support/faqs/res/findit.html
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/



© Copyright 1996–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index