[R-sig-eco] lme4 for pseudoreplication avoidance

ONKELINX, Thierry Thierry.ONKELINX at inbo.be
Mon Feb 25 10:03:38 CET 2013


Dear Lara,

I think you want

lmer(AntSize  ~ ColonySize + (1|ColonyID))

Best regards,

ir. Thierry Onkelinx
Instituut voor natuur- en bosonderzoek / Research Institute for Nature and Forest
team Biometrie & Kwaliteitszorg / team Biometrics & Quality Assurance
Kliniekstraat 25
1070 Anderlecht
Belgium
+ 32 2 525 02 51
+ 32 54 43 61 85
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-ecology-bounces at r-project.org [mailto:r-sig-ecology-bounces at r-project.org] Namens Lara R. Appleby 04
Verzonden: maandag 25 februari 2013 7:32
Aan: r-sig-ecology at r-project.org
Onderwerp: [R-sig-eco] lme4 for pseudoreplication avoidance

I am following a suggestion from http://www.coloss.org/beebook/I/invitro/3/1to
use nesting in my analyses of measurements of individual worker ants within multiple colonies.

"y" is a worker-level trait (e.g. the size of an individual worker ant) measured once for each individual worker in the study "a" is the colony ID "b" is a colony-level trait (e.g. colony size at the beginning of the experiment) measured once for each colony in the study

All of the workers ("y") in a colony share an "a" value and a "b" value.

I want to know the independent effects of a and b on y, accounting for the non-independence of worker-level observations.

How do I code this kind of model?

I get as far as:

lme4 (y~a+b)

but I don't know how to code the nesting bit in this case.

_______________________________________________
R-sig-ecology mailing list
R-sig-ecology at r-project.org
https://stat.ethz.ch/mailman/listinfo/r-sig-ecology
* * * * * * * * * * * * * D I S C L A I M E R * * * * * * * * * * * * *
Dit bericht en eventuele bijlagen geven enkel de visie van de schrijver weer en binden het INBO onder geen enkel beding, zolang dit bericht niet bevestigd is door een geldig ondertekend document.
The views expressed in this message and any annex are purely those of the writer and may not be regarded as stating an official position of INBO, as long as the message is not confirmed by a duly signed document.



More information about the R-sig-ecology mailing list