[R-sig-ME] Mixed-effects model with varying slope and intercept (multiple regression)

ONKELINX, Thierry Thierry.ONKELINX at inbo.be
Tue Jun 12 12:16:51 CEST 2012


Dear Tommaso,

I would not use random effect for habitat since you have only 3 levels. Either use it as a fixed effect (with or without interactions) or ignore it. It is up to you to decide what option is the most relevant. If you drop the random effects then you have a simple glm() instead of glmer().

Best regards,

Thierry

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 op 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 op r-project.org [mailto:r-sig-mixed-models-bounces op r-project.org] Namens Tommaso Jucker
Verzonden: dinsdag 12 juni 2012 10:47
Aan: r-sig-mixed-models op r-project.org
Onderwerp: [R-sig-ME] Mixed-effects model with varying slope and intercept (multiple regression)

Dear List,

I am testing how the species richness (SR) of a plant community is affected by the presence of an invasive species (Alien). To control for confounding environmental factors my model also contains two covariates
(CV1 and CV2, both continuous). As I have sampled plant communities in 3 different habitats, I would like to fit a mixed-effects model which allows for different effects of the invasive on species richness depending on the habitat in question (in other words separate slopes and intercepts for each of the 3 habitats). Currently my model looks like this:

model <- SR ~ Alien + CV1 + CV2 + (1 + Alien | Habitat)

However, I think this is not correct as the effects of the two covariates are not included in the random effect (slope and intercept vary among habitats, but only account for the effect of the invasive species). How can I formally include the effects of the two covariates in the random effect terms and is this necessary?

Any suggestions are much appreciated.

Best wishes,

Tommaso
__________________________________________________________________________

*Tommaso Jucker*

*    Ph.D. student*
*    Forest Ecology and Conservation Group*
*    Department of Plant Sciences*
*    University of Cambridge*

        [[alternative HTML version deleted]]

_______________________________________________
R-sig-mixed-models op r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-sig-mixed-models
* * * * * * * * * * * * * 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-mixed-models mailing list