[R-sig-ME] Extract a variance estimate per level of random effect

Samantha Patrick spatrick at cebc.cnrs.fr
Mon Jun 18 10:29:07 CEST 2012


Hi

I am currently trying to estimate how consistent individuals are in a 
trait.  I want to produce an estimate of the variability for each level 
of a random effect (ID).  I can do this simply by calculation the 
variance for each ID separately but I am trying to extract this 
information from a mixed model (either in lmer or mcmcglmm).  I have 
trawled the mailing list but can not find any answers.

As an simplified dummy example I have 2 individuals, each with 5 
observations of a trait.  I can calculate 2 variances, using the 5 
observations for each individual.

head(Data)
ID    trait1
1        10
1        15
1        12
1        19
1        11
2        9
2        10
2        9
2        10
2        10

Variance for 1 = 4.67
Variance for 2 = 0.3

Alternatively I can fit a model of:

model1<-lmer(trait1 ~(1|ID))

 From the variance covariance matrix I can easily extract the between 
and within group variances, but is there a way to extract individual 
variance estimates?

Many Thanks

Sam

-- 

Dr Samantha Patrick
Post Doctoral Fellow
Centre d'Etudes Biologiques de Chizé - CNRS
79360 Villiers-en-Bois
France
T:+33 549 097 846
M:+33 675 603 451
Skype: sammy_patrick
http://www.cebc.cnrs.fr/Fidentite/patrick/patrick.htm
http://www.researchgate.net/profile/Samantha_Patrick/



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