Skip to content
Prev 9142 / 20628 Next

lmer: effects of forcing fixed intercepts and slopes

Let me slip in a word of praise for Simon Wood's book, 'Generalized Additive
Models', particularly chapter 6 on mixed models. The man is a genius for
explaining statistics, and his introduction to mixed models is the clearest
I've come across. It's canonical for me!
--Seth  


-----Original Message-----
From: r-sig-mixed-models-bounces at r-project.org
[mailto:r-sig-mixed-models-bounces at r-project.org] On Behalf Of ONKELINX,
Thierry
Sent: Wednesday, November 07, 2012 4:01 AM
To: Gjalt-Jorn Peters; r-sig-mixed-models at r-project.org
Subject: Re: [R-sig-ME] lmer: effects of forcing fixed intercepts and slopes

Mixed models are not that scary. I would recommend to read Zuur et al
(2009). It was written with 'mainstream researchers' (in ecology) in mind.
It start with simple linear models and gradually adds complexity (glm, gam,
lmm, glmm, gamm, ...)

@BOOK{ZuurMixedModels,
  title = {{M}ixed {E}ffects {M}odels and {E}xtensions in {E}cology with
{R}},
  publisher = {Springer New York},
  year = {2009},
  author = {Zuur, Alain F. and Ieno, Elena N. and Walker, Neil J. and
Saveliev, Anatoly A. and Smith, Graham M.},
  doi = {10.1007/978-0-387-87458-6}
}

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-mixed-models-bounces at r-project.org
[mailto:r-sig-mixed-models-bounces at r-project.org] Namens Gjalt-Jorn Peters
Verzonden: dinsdag 6 november 2012 21:42
Aan: r-sig-mixed-models at r-project.org
Onderwerp: Re: [R-sig-ME] lmer: effects of forcing fixed intercepts and
slopes

Dear list,

Thierry, great, thank you very much for your quick reply! I will drop moment
as a random slope, and read up on the different hypotheses that are being
tested.

I have one more question. Basically, I have no background in multilevel (as
you may have guessed :-)). The reason I'm 'in over my head' like this, is
because I basically want to 'use the proper analysis' for my data, and the
only method is apparently mixed models. "All I want" is the simplest'
statistically decent, way to test whether cannabis use at the second
measurement moment is different in the group that received that intervention
as compared to the group that didn't.

However, when I try to learn about mixed models, the sources I encounter
approach the modelling practice very differently. They seem to be about much
more advanced issues; whether random intercepts and slopes should be
included, and for which variables, etc (to stick to those issues that I at
least kind of understand). Apparently, either mixed models are only used by
people who are statistically much more advanced (i.e. there's a gap between
'mainstream researchers' and the people who understand and use mixed
models), or in fact these sources _do_ discuss the same things, but in mixed
models the terminology just differs a lot from what you encounter in more
basic statistical textbooks.

I basically have the idea that although my requirements are very basic, I
have to learn lots of dark arcane issues to be able to do this properly.
This is kind of 'scary', as, for example, matrix algebra is, well, scary :-)

What do people here think of this? Is mixed models just something you should
avoid unless you're able & willing to really delve into its statistical
innards?

Again, thank you very much, kind regards,

Gjalt-Jorn
On 06-11-2012 17:25, ONKELINX, Thierry wrote:
per participant per moment, you cannot fit a random 'slope' along moment per
participant. Note the perfect correlation in your null model for the nested
random effect.
end up with near perfect correlations in this random effect. So I would
advise to drop moment as a random slope.
than an LRT between two models! You might do some reading on that topic or
get some local statistical advise.
than asking him to perform a post-mortem examination: he may be able to say
what the experiment died of.
ensure that a reasonable answer can be extracted from a given body of data.
none of the terms is significant; but the model suddenly fits A LOT better .
. .
effective. It's a repeated measures design where we measured cannabis use of
each student before and after the intervention. In addition to having
repeated measures, students are nested in schools. A simple plot of the
percentage of cannabis users before and after the intervention, in the
control and the intervention groups, is at
http://sciencerep.org/files/7/plot.png (this plot ignores the schools).
'Intervention' and 'Control'; 'usedCannabis_bi' has 2 levels, 0 and 1; and
participants is the participant identifyer.
formulations I use:
participant),
data=dat.long);
moment*cannabisShow);
moment and whether participants received the intervention (this should
reflect an effect of the intervention), fits considerably better than the
original model. But, the interaction is not significant. In fact, none of
the fixed effects is - so I added terms to the model, none of these terms
significantly contributes to the prediction of cannabis use, yet the model
fits a lot better.
possible?
on the participant level (so intercepts and slopes could only vary per
school):
data=dat.long);
moment*cannabisShow);
significant, as I expected; but the improvement in fit between the null
model and the 'full model' is much, much smaller.
something basic, but I have no idea what. Any help is much appreciated!
weer en binden het INBO onder geen enkel beding, zolang dit bericht niet
bevestigd is door een geldig ondertekend document.
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.



_______________________________________________
R-sig-mixed-models at 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.

_______________________________________________
R-sig-mixed-models at r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-sig-mixed-models