[R] How to get predictions, plots, etc. from lmer{lme4}
Michael Kubovy
kubovy at virginia.edu
Sat Apr 16 15:52:22 CEST 2005
Any comments on the following strategy:
(1) Take the log-odds of the frequencies of b and a (adding 1/6, as
Tukey recommended) and run lme.
(2) If the estimates from lme are in line with the estimates I got from
lmer, then use the results from lme.
On Apr 16, 2005, at 9:16 AM, Douglas Bates wrote:
> Michael Kubovy wrote:
>> I'm having trouble using lmer beyond a first step.
>> My data:
>> > some(exp1B)
>> sub ba amplitude a b c d
>> 2 1 1.00 1.5 65 63 4 8
>> 41 4 1.15 0.0 92 41 3 4
>> 43 4 1.15 3.0 88 48 2 2
>> 63 6 1.00 3.0 50 72 9 9
>> 77 8 1.15 0.0 112 25 2 1
>> 89 10 1.15 0.0 37 33 36 34
>> 126 13 1.15 1.5 80 50 6 4
>> 140 14 1.15 4.5 12 115 6 7
>> 145 20 1.00 0.0 73 65 0 2
>> 147 20 1.00 3.0 63 72 2 3
>> etc.
>> The output:
>> > summary(exp1B.both.cont.lmer)
>> Linear mixed-effects model fit by maximum likelihood
>> Formula: cbind(b, a) ~ ba + amplitude + (1 | sub)
>> Data: exp1B
>> AIC BIC logLik MLdeviance REMLdeviance
>> 768.0086 783.2579 -379.0043 758.0086 766.3104
>> Random effects:
>> Groups Name Variance Std.Dev.
>> sub (Intercept) 0.18787 0.43344
>> Residual 6.36355 2.52261
>> # of obs: 156, groups: sub, 13
>> Fixed effects:
>> Estimate Std. Error DF t value Pr(>|t|)
>> (Intercept) 4.118806 0.397780 153 10.3545 < 2.2e-16
>> ba -4.205518 0.330010 153 -12.7436 < 2.2e-16
>> amplitude 0.137958 0.023754 153 5.8076 3.547e-08
>> This is just what I need. But I also need predicted values, plots,
>> etc, and can't figure out how to proceed. Have I overlooked a more
>> extended document than the rather terse (for me at least) help page?
>
> I regret to say no. Methods for generalized linear mixed models fit
> by lmer are still rather rudimentary.
_____________________________
Professor Michael Kubovy
University of Virginia
Department of Psychology
USPS: P.O.Box 400400 Charlottesville, VA 22904-4400
Parcels: Room 102 Gilmer Hall
McCormick Road Charlottesville, VA 22903
Office: B011 +1-434-982-4729
Lab: B019 +1-434-982-4751
Fax: +1-434-982-4766
WWW: http://www.people.virginia.edu/~mk9y/
More information about the R-help
mailing list