[R-sig-ME] Random intercept and slope model with lmer
Hank Stevens
hank.stevens01 at gmail.com
Fri Mar 12 11:46:26 CET 2010
Hi Ben et al.,
I am one of those lurkers ....
I have an almost off-topic comment/question about the meaning of
"smaller." First, however, I vote to keep these "too basic" replies
coming. Thanks Ben! I like being reminded of the meaning of a standard
deviation.
On Tue, Mar 9, 2010 at 7:17 PM, Ben Bolker <bolker at ufl.edu> wrote:
> [I am taking the liberty of forwarding back to r-sig-mixed-models ...
> you may feel this is 'too basic', but (as I always tell my classes)
> there are probably quite a few people lurking on the list who wouldn't
> mind knowing the answers -- or at least knowing my answers (which may
> not be "the" answers.]
>
> The standard deviations of the random effects are interpretable on the
> same scale as the corresponding fixed effects, and hence directly
> comparable. For example, your intercept is approx. 43 (in whatever
> units); the standard deviation of the variation in intercepts among
> localities (?) is 47; and the standard deviation of the residual
> variation among observations is 21. Hence, while the average value at
> time=0 is strongly different from zero (t-score approx. 7), this
> difference from zero is quite a bit smaller than the variation among
> individual observations (think about +/- 2 std. dev.),
Yeah, but aren't most deviations +/- 1 std. dev.? I can't think of too
many ecological data sets in which there is NOT substantial noise. I
once raised Ben's point (i.e., that the signal is small relative to
the noise) with a medical person with whom I was working, and their
response was "it may be a small effect, but multiply that effect times
the number of patients, and the cost of NOT addressing the small
effect..."
Hank
which is in turn
> smaller than the variation among localities. The other random effect
> (time|localidad) describes the variation in slope among localities (a
> similar comparison to that above applies to the strongly negative
> average slope with great variation in slopes among localities).
>
> However, there is also something a bit funny with your model, because
> the correlation between the random effects is listed as being -1: the
> random variation in slopes and intercepts is perfectly (negatively)
> correlated. Possibly your experimental/observational design is
> insufficient (you only have an average of about 4 observations per
> group); it might also help to center your time variable at the midpoint
> time.
>
> I also think that looking at Ch. 4 of Bates's book draft
> <http://lme4.r-forge.r-project.org/book/Ch4.pdf>, or at the equivalent
> examples (Orthodont etc.) in PB2000, would be helpful.
>
> cheers
> Ben
>
>
> Manuel Spínola wrote:
>> Dear Ben,
>>
>> Sorry to bother you with this again, but what do you look for at the
>> output of a mixed model in R? I know what to do with the fixed effect,
>> but what about the random effects?:
>>
>> > modelo7 = lmer(ipa ~ time + (time | localidad), data=ipa)
>> > summary(modelo7)
>> Linear mixed model fit by REML
>> Formula: ipa ~ time + (time | localidad)
>> Data: ipa
>> AIC BIC logLik deviance REMLdev
>> 1917 1937 -952.4 1913 1905
>> Random effects:
>> Groups Name Variance Std.Dev. Corr
>> localidad (Intercept) 2232.31 47.247
>> time 545.97 23.366 -1.000
>> Residual 450.92 21.235
>> Number of obs: 196, groups: localidad, 49
>>
>> Fixed effects:
>> Estimate Std. Error t value
>> (Intercept) 42.852 6.918 6.194
>> time -19.746 3.603 -5.480
>>
>> Correlation of Fixed Effects:
>> (Intr)
>> time -0.904
>>
>> Thank you very much in advance.
>> Best,
>>
>> Manuel
>>
>>
>> Ben Bolker wrote:
>>> Manuel Spínola wrote:
>>>
>>>> Dear Ben,
>>>>
>>>> I am trying to fit a random intercept and slope model with lme4 using
>>>> function lmer.
>>>> Is my formulation correct?
>>>>
>>>> > names(ipa)
>>>> [1] "localidad" "time" "ipa"
>>>>
>>>> > modelo7 = lmer(ipa ~ time + (time | localidad), data=ipa)
>>>>
>>>> Thank you very much in advance.
>>>> Best,
>>>>
>>>> Manuel
>>>>
>>>>
>>> That looks reasonable.
>>> See
>>>
>>> http://lme4.r-forge.r-project.org/book/
>>>
>>> especially chapter 4.
>>>
>>> (Why not send these questions to r-sig-mixed-models at r-project.org ?)
>>>
>>>
>>
>>
>
>
> --
> Ben Bolker
> Associate professor, Biology Dep't, Univ. of Florida
> bolker at ufl.edu / people.biology.ufl.edu/bolker
> GPG key: people.biology.ufl.edu/bolker/benbolker-publickey.asc
>
> _______________________________________________
> 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