Skip to content
Prev 23005 / 398502 Next

Extracting variance component estimates from lme

I assume I'm missing something obvious here...

The short form of my main question is: how do I extract variance
components from an lme object?

The longer form (plus optional supplementary question!): I'm looking at
some quantitative genetics, and want to estimate two variance components
so that I can then calculate a statistic called Qst from them.  So I
have this:

  reg1 <- lme(y ~ temp*food, random =~1|POP/SIRE/DAM,
na.action=na.exclude))
  summary(reg1)

which shows me the random effects as standard deviations.  I then want
the SIRE and POP variance components (as Vsire and Vpop respectively) to
put into the calculation of Qst as 

Qst <- Vpop/(Vpop + 8*Vsire)

And obviously writing down the components and then plugging them in is
not elegant.  Especially as I then want to calculate the standard error
for Qst, which leads me to my supplementary question...

I could calculate the standard errors by bootstrapping, but it would
probably be quicker to sample the relevant components from the
likelihood, and calculate Qst from that.  But I would need to know the
distribution of the components.  Can anyone point me in teh right
direction to a reference on this?  For balanced data it's easy, but what
about un-balanced data?  That wasn't an R query, but you can probably
see whats' coming...  If you know the answer to the last question, then
how do I sample from the distribution?  Again, if it's a gamma/chi^2
then I already know, but if not...

Thanks in advance!

Bob