[R-sig-ME] mixed effect models where time ordering is important
Steve Candy
burwood70 at gmail.com
Wed Apr 22 13:16:09 CEST 2015
Michelle
If variation in initial weights is of concern you could use periodic growth
(i.e. first differences in weight) as the response variable. Also you could
fit cubic regression splines in time for each toxin level and control
specified as a 4-level factor (dose_f) combined with residual plots for each
animal to detect departures from the average shape of the time response for
each factor level. Something like
library(mgcv)
gamm_01 <- gamm(formula = log(Weight) ~ dose_f + s(time, by=dose_f,
bs="cr"), data=data, random=list(subject=~1),
correlation=corCAR1(form= ~ time | subject))
or replace Weight with Growth ={Weight(time_i+1)-Weight(time_i)}.
To model the dose response component and assuming a common time response
shape on the log scale you might want to consider; 1). specify a dummy (1,0)
for Control (0) vs Dosed (1) as "NotContr_d" (i.e. the intercept gives the
control intercept), 2). LogDose is set to zero for the control and is the
log of the actual dose (low, medium, high) for the dosed treatments, and
define Control_f <- as.factor(NotContr_d) then 3). replace the above gamm
with
gamm_01 <- gamm(formula = log(Weight) ~ NotContr_d + LogDose + s(time,
by=Control_f, bs="cr"), data=data, random=list(subject=~1),
correlation=corCAR1(form= ~ time | subject))
The log transforms used above are just suggestions which can be compared to
using raw Weights or Doses.
> Hi all,
>
> I have repeated measures weight data on rats who were in a 28-day toxin
study. I have one control group and the toxin was administered at one of
three doses (low, medium, high). This is not a cross-over design, so (for
example) the rats who were in the low dose group always got the low dose
over the course of the study.
>
> The rats were not fully grown when the study started. Body weights were
measured every fourth day.
>
> The interest is in seeing if the toxin has an influence on body weight. I
am looking at using lmer to analyse this data, however I am unsure how to
handle the ordering of time, as this will be correlated with increasing body
weight.
>
> If I did not have to worry about time ordering, I thought this model would
work:
>
> Weight ~ dose + (1|subject)
>
> The doses are being treated as fixed effects as I am not wanting to
extrapolate the impact of dose beyond what was administered in the study.
>
> I was wondering if the appropriate model for my data would be:
>
> Weight ~ dose * time + (1|subject)
>
> However, time is measured as days from initial dose administration (e.g.
day 1 = first day of dosing). While the rats are all very similar in age, I
do not believe they were all born on the same day, and so I am unsure about
time as a proxy for age (assuming an intercept in the model). And day is
measured discontinuously (every fourth day). I feel that omitting day will
remove one obvious explanatory variable from the model, which may bias the
results as well as producing a model that poorly fits the data.
>
> I have tried to find an example of a toxicology study that uses a mixed
effects model in R on repeated measures, that specifies the model. I have
been unable to locate one.
>
> I would appreciate any advice/recommendations on how to handle this data.
I have already advised that a series of separate ANOVAs are not
statistically defensible given that the weights are likely to be
auto-correlated and the statistical analysis needs to account for this.
>
> Cheers
> Michelle, note: I do not work Fridays
Dr Steven G. Candy
Director/Consultant
SCANDY STATISTICAL MODELLING PTY LTD
(ABN: 83 601 268 419)
70 Burwood Drive
Blackmans Bay, TASMANIA, Australia 7052
Mobile: (61) 0439284983
[[alternative HTML version deleted]]
More information about the R-sig-mixed-models
mailing list