[R] mixed models lmer function help!!

Bert Gunter bgunter.4567 at gmail.com
Mon Jun 19 22:08:40 CEST 2017


1. A mess, because you failed to read and follow the posting guide:
This is a **plain text** mailing list, which means that html can get
mangled, as you have demonstrated.

2. And wrong list: the r-sig-mixed-models list is where this would be
more suitable.

Cheers,

Bert
Bert Gunter

"The trouble with having an open mind is that people keep coming along
and sticking things into it."
-- Opus (aka Berkeley Breathed in his "Bloom County" comic strip )


On Mon, Jun 19, 2017 at 9:29 AM, Shelby Leonard via R-help
<r-help at r-project.org> wrote:
> Hi,I have tumor growth curve data for a bunch of different mice in various groups. I want to compare the growth curves of the different groups to see if timing of drug delivery changed tumor growth.I am trying to run a mixed models with repeated measures over time with each mouse as a random effect with linear and quadratic terms for time.This took me a long time to figure out and I just wanted to make sure I did it correctly and I am interpreting it correctly. This is the code I ran
> Rtumor<-lmer(volume~Group+Time+(1|Subject), data=Rtumor)summary(Rtumor)Rtumor.null=lmer(volume~Time+(1|Subject), data=Rtumor, REML=FALSE)Rtumor.full=lmer(volume~Group+Time+(1|Subject), data=Rtumor, REML=FALSE)anova(Rtumor.null,Rtumor.full)
> Here is my output Rtumor<-lmer(volume~Group+Time+(1|Subject), data=Rtumor)> summary(Rtumor)Linear mixed model fit by REML ['lmerMod']Formula: volume ~ Group + Time + (1 | Subject)   Data: Rtumor
> REML criterion at convergence: 1541.2
> Scaled residuals:     Min      1Q  Median      3Q     Max -1.8006 -0.6348 -0.0658  0.3903  4.7551
> Random effects: Groups   Name        Variance  Std.Dev.  Subject  (Intercept) 3.197e-09 5.654e-05 Residual             3.348e+05 5.786e+02Number of obs: 101, groups:  Subject, 11
> Fixed effects:            Estimate Std. Error t value(Intercept) -495.520    303.619  -1.632Group         24.350    115.615   0.211Time          79.653      7.886  10.101
> Correlation of Fixed Effects:      (Intr) Group Group -0.933       Time  -0.300 -0.007
>> Rtumor.null=lmer(volume~Time+(1|Subject), data=Rtumor, REML=FALSE)> Rtumor.full=lmer(volume~Group+Time+(1|Subject), data=Rtumor, REML=FALSE)> anova(Rtumor.null,Rtumor.full)Data: RtumorModels:Rtumor.null: volume ~ Time + (1 | Subject)Rtumor.full: volume ~ Group + Time + (1 | Subject)            Df    AIC    BIC  logLik deviance  Chisq Chi Df Pr(>Chisq)Rtumor.null  4 1576.5 1586.9 -784.24   1568.5                         Rtumor.full  5 1578.4 1591.5 -784.22   1568.4 0.0457      1     0.8307There were 50 or more warnings (use warnings() to see the first 50)
>
>
> My questions are1) Did I do this correctly?2) Do I still need to run it again with quadratic terms for time?, If so, how do I do this?3) If I am understanding these results correctly, they say There is no difference between these groups on volume growth curves
>         [[alternative HTML version deleted]]
>
> ______________________________________________
> R-help at r-project.org mailing list -- To UNSUBSCRIBE and more, see
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.



More information about the R-help mailing list