I am trying to extract the solution from a simple lme calculation.
For example (the first 4 have a mean 0, sd 1):
Linear mixed-effects model fit by REML
Fixed: y ~ 1
Formula: ~1 | gp
StdDev: 7.026737 0.9999747
Number of Observations: 5
Number of Groups: 2
The problem is to get the random effects intercept - essentially the
between groups standard deviation - into a scalar. I can't see anything
in the values from res. The other values - fixed intercept and residual -
are clearly available - eg res$coeff$fixed is straight forward.
I would use lmer but this does not appear to return any values.
Can someone advise please? I do recall having this problem some time ago
but that was with a much older version. This is with R 2.2.1 and the
John Logsdon "Try to make things as simple
Quantex Research Ltd, Manchester UK as possible but not simpler"
[hidden email][hidden email] +44(0)161 445 4951/G:+44(0)7717758675 www.quantex-research.com
John Logsdon <j.logsdon <at> quantex-research.com> writes:
> I am trying to extract the solution from a simple lme calculation.
> > y<-c(-1.118,-.5,.5,1.118,10)
> > gp<-factor(c(rep('one',4),'two'))
> > res<-lme(y~1,rand=~1|gp)
> Random effects:
> Formula: ~1 | gp
> (Intercept) Residual
> StdDev: 7.026737 0.9999747
> The problem is to get the random effects intercept - essentially the
> between groups standard deviation - into a scalar.
will give you the matrix with the relevant numbers