[R-sig-ME] Nested random factor

Douglas Bates bates at stat.wisc.edu
Fri Jan 23 00:14:25 CET 2009


On Thu, Jan 22, 2009 at 11:10 AM, Renwick, A. R. <a.renwick at abdn.ac.uk> wrote:

> I am running a LME with a nested random factor using the 'nlme' package and ahave a query interpreting the varince of the netsed random factor.
> My data contains samples from 7 farms, and within these farms I sampled at 2 sites.  The total number of sites was therefore 14, of which I sampled 4 times.

> I therefore have used the following random effect:
> 1|Farm/Site

> My final model is below:

> mrem<-lme(log(Nhat+1)~ Width + crop+sess +Width:sess ,random=~1|Farm/Site,data=all, method="REML",correlation=NULL,weights=varIdent(form=~1|Group3))

> summary(mrem)

> #part of the summary
> #Linear mixed-effects model fit by REML
> # Data: all
> #       AIC      BIC    logLik
> #  106.2403 136.8477 -34.12013
> #
> #Random effects:
> # Formula: ~1 | Farm
> #        (Intercept)
> #StdDev:   0.1597866
> #
> # Formula: ~1 | Site %in% Farm
> #        (Intercept) Residual
> #StdDev:   0.2458009 0.928392
> #Number of Observations: 51
> #Number of Groups:
> #          Farm Site %in% Farm
> #             7             14

> I would like to check that I am interpreting the random effect correctly.
> 1) The std dev of the between-farm variance is 0.16

That phrase is a bit peculiar.  I think I would say either,

The standard deviation of the random effect for farm is 0.16

or

The between-farm variance is (0.16)^2

> 2) The std dev of the between-site variance is 0.25

In your terminology I would say, "The variance between sites within
farms is (0.25)^2."

> 3) The std dev of the within-site variance is 0.93.

Again, I would phrase this as "The variance within sites is (0.93)^2."

> However, I think I may have missed out the 'nesting' part,i.e the variance within sites within farms, and the variance between sites within farms.

Because sites are nested within farms, "within site" is the same as
"within site, within farms" and "between sites within farms" is your
line 2) above.  If you were to eliminate the random effect for farm
(and ensure that each distinct site has a distinct label - that is,
avoid "implicit nesting") then you would estimate a "between site"
variance.

I'm not surprised that this seems confusing.  I certainly found all
the material on variance components with mean squares and expected
mean squares to be confusing when I was first exposed to it. I vowed I
would stay as far away from that type of statistics as I could because
it was just so tedious and messy.  Obviously I didn't succeed in
staying away from it.

> Any help to clarify this point would be much appreciated.
>
> Many thanks,
> Anna
>
> Anna Renwick
> Institute of Biological & Environment Sciences
> University of Aberdeen
> Zoology Building
> Tillydrone Avenue
> Aberdeen
> AB24 2TZ
>
>
> The University of Aberdeen is a charity registered in Scotland, No SC013683.
>
> _______________________________________________
> R-sig-mixed-models at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-sig-mixed-models
>




More information about the R-sig-mixed-models mailing list