[R-sig-ME] RLRsim masked VarCorr
ONKELINX, Thierry
Thierry.ONKELINX at inbo.be
Tue Jul 26 10:03:42 CEST 2011
Dear Mollie,
Try nlme:VarCorr(mod1) instead of VarCorr(mod1)
Best regards,
Thierry
----------------------------------------------------------------------------
ir. Thierry Onkelinx
Instituut voor natuur- en bosonderzoek
team Biometrie & Kwaliteitszorg
Gaverstraat 4
9500 Geraardsbergen
Belgium
Research Institute for Nature and Forest
team Biometrics & Quality Assurance
Gaverstraat 4
9500 Geraardsbergen
Belgium
tel. + 32 54/436 185
Thierry.Onkelinx at inbo.be
www.inbo.be
To call in the statistician after the experiment is done may be no more than asking him to perform a post-mortem examination: he may be able to say what the experiment died of.
~ Sir Ronald Aylmer Fisher
The plural of anecdote is not data.
~ Roger Brinner
The combination of some data and an aching desire for an answer does not ensure that a reasonable answer can be extracted from a given body of data.
~ John Tukey
> -----Oorspronkelijk bericht-----
> Van: r-sig-mixed-models-bounces at r-project.org [mailto:r-sig-mixed-models-
> bounces at r-project.org] Namens Mollie Brooks
> Verzonden: maandag 25 juli 2011 19:17
> Aan: r-sig-mixed-models at r-project.org
> Onderwerp: [R-sig-ME] RLRsim masked VarCorr
>
> Hi,
> I need to use the packages lmer and RLRsim in some code. I need to extract the
> interclass correlation and I would use the following lines
>
> growdat=data.frame(individual=rep(rep(1:8),3), growth=rep(rnorm(8, mean=0,
> sd=2),3)+rnorm(3*8, sd=1)) mod1=lmer(growth~(1|individual), data=growdat)
> ind_var=attr(VarCorr(mod1)$individual,"stddev")^2
> res_var=attr(VarCorr(mod1),"sc")^2
>
> but this causes the error
> Error in UseMethod("VarCorr") :
> no applicable method for 'VarCorr' applied to an object of class "mer"
> Calls: VarCorr
> Execution halted
>
> because loading RLRsim masked the function VarCorr.
> Is there an alternative way to get these elements out of the mer object?
> Extracting them before loading RLRsim isn't an option because the model fits
> and info extraction are in a big loop for replication.
>
> thanks,
> Mollie
>
> Mollie Brooks
> Ph.D. Candidate
> NSF IGERT Fellow
> Biology Department
> University of Florida
> mbrooks at ufl.edu
> www.zoology.ufl.edu/mbrooks
>
>
>
>
> [[alternative HTML version deleted]]
>
> _______________________________________________
> 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