[R-sig-ME] Linear mixed model query
Etn bot
etnbot1 at gmail.com
Wed Sep 30 16:18:19 CEST 2015
Many thanks for your response Ben, it is greatly appreciated
Kind regards
Etn
On 25 September 2015 at 20:47, Ben Bolker <bbolker at gmail.com> wrote:
> On Thu, Sep 24, 2015 at 10:06 AM, Etn bot <etnbot1 at gmail.com> wrote:
> > Hi all,
> >
> > My study looks at allergy levels of skin patches from patients and
> readings
> > (repeated 5 times) are measured over 4 time points
> >
> > I need to determine if the allergy level for skin patch changes over time
> > (e.g. if allergy level from skin patch 1 for patient 1 at time 0 is
> > different from allergy level for skin patch 1 for patient 1 at time 1
> etc.)
> > I do not want to see the difference between skin patch 1 and skin patch
> > 2....
> >
> > using package lmer:
> > model<-lmer(allergy_level ~ time +(time|patient/patch))
> >
> > Results from this model indicate that time is not significant - the
> average
> > patient allergy level for individual skin patches does not change over
> > time:
> >
> > Random effects:
> >
> > Groups Name Variance Std.Dev. Corr
> >
> > ID:patch (Intercept) 17.4109 4.1726
> >
> > time1 2.7109 1.6465 -0.30
> >
> > time2 3.0082 1.7344 -0.26 0.60
> >
> > time3 5.7643 2.4009 -0.35 0.15 0.54
> >
> > patch (Intercept) 19.1576 4.3769
> >
> > time1 0.2103 0.4586 -0.56
> >
> > time2 0.4372 0.6612 -0.94 0.48
> >
> > time3 0.5895 0.7678 -0.48 0.96 0.49
> >
> > Residual 4.9467 2.2241
> >
> > Number of obs: 2956, groups: ID:patch, 149; patch, 16
> >
> >
> >
> > Fixed effects:
> >
> > Estimate Std. Error t value
> >
> > (Intercept) 6.44763 1.15028 5.605
> >
> > time1 -0.01907 0.21237 -0.090
> >
> > time2 -0.03172 0.24759 -0.128
> >
> > time3 -0.01124 0.29940 -0.038
> >
> >
> I was going to ask if you wanted to treat time as linear, but there's
> not much evidence that it will help you here.
> >
> >
> >
> > model1: Force ~ 1 + (1 + time | patch/ID)
> >
> > model2: Force ~ time + (1 + time | patch/ID)
> >
> > Df AIC BIC logLik deviance Chisq Chi Df Pr(>Chisq)
> >
> > model11 22 14281 14413 -7118.5 14237
> >
> > model12 25 14287 14437 -7118.4 14237 0.0208 3 0.9992
> >
> > I have extracted the random coefficients from model 1:
> >
> > ranef(model1)
> >
> > $`ID:patch`
> >
> > (Intercept) time1 time2 time3
> >
> > 1:11 5.9845070 0.34088535 0.431998708 1.590906238
> >
> > 1:12 5.1236456 -0.03178611 -0.149784278 -0.116150278
> >
> > 1:13 6.3746877 -0.76853294 -0.550037715 0.842518786
> > :
> > :
> > However, I need to be able to tell if there is a significant difference
> for
> > individual patches for individual patients over time
> >
> > e.g.
> > If I run individual linear regression on patient 1 for skin patch 1,
> > results show that that time is significant:
> >
> > Coefficients:
> >
> > Estimate Std. Error t value Pr(>|t|)
> >
> > (Intercept) 18.0800 0.6523 27.717 5.95e-15 ***
> >
> > time1 0.3600 0.9225 0.390 0.701502
> >
> > time2 1.2400 0.9225 1.344 0.197641
> >
> > time3 -4.3400 0.9225 -4.705 0.000239 ***
> >
> > ---
> >
> > Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
> >
> >
> >
> > Residual standard error: 1.459 on 16 degrees of freedom
> >
> > Multiple R-squared: 0.7323, Adjusted R-squared: 0.6821
> >
> > F-statistic: 14.59 on 3 and 16 DF, p-value: 7.679e-05
> >
> >
> > If I run individual regression models for each skin patch for each
> patient,
> > this will result in a large number of models as I have There are 16 skin
> > patches per patient. (10 patients in total) 5 readings are taken at each
> of
> > the 4 time points.
> >
> > I thought linear mixed models would be an appropriate method to answer my
> > question (I need to be able to tell if there is a significant difference
> > for individual patches for individual patients over time).
> >
>
> When you adopt a random-effects formulation, you forego the ability
> to perform significance tests on individual levels -- that's the price you
> pay for the benefits of doing shrinkage estimation. If you need
> significance
> tests on individual patch/patient combinations, you're going to be
> stuck with 160 significance tests (you should probably consider some
> kind of multiple-comparisons correction ...)
>
> Ben Bolker
>
[[alternative HTML version deleted]]
More information about the R-sig-mixed-models
mailing list