[R-sig-ME] fitting model for repeated measures cross-over design?

Malcolm Fairbrother m.fairbrother at bristol.ac.uk
Thu May 24 16:23:50 CEST 2012


Dear Kirstin,

If I've understood correctly, I'm pretty sure you want "ID/session" not "session/ID", because person-sessions are nested within persons.

And I don't think it makes sense to interact your linear and quadratic time effects (what would such an interaction mean?)… I would think this would make more sense:

factor(agegroup)*time_point*factor(stim.cond) + factor(agegroup)*time_point2*factor(stim.cond)

Even this will generate results that will be hard to interpret, with so many interactions… you'll need lots of plots of the expected outcome for different combinations of agegroup and stim.cond, versus time.

Good luck,
Malcolm



> Date: Wed, 23 May 2012 10:48:45 +0200
> From: Kirstin-Friederike Heise <kheise at uke.uni-hamburg.de>
> To: <r-sig-mixed-models at r-project.org>
> Subject: Re: [R-sig-ME] fitting model for repeated measures cross-over
> 	design?
> Message-ID: <C4AD7DD1-D6A7-49AD-BA4B-6FD9E642A66E at uke.uni-hamburg.de>
> Content-Type: text/plain
> 
> Dear list members, 
> 
> since I am still struggling with building a linear mixed effects model, I will try to rephrase and specify my questions:
> 
> I am analyzing a transient treatment effect (treatment vs. placebo) in a cross-over experiment (2 sessions) in two groups (old, young participants) with repeated measurements (before, during, after treatment in minutes) for both treatment conditions on metric outcome variables. Since I expect a non-linear development of a possible treatment effect over time, I tried to include a quadratic polynomial for time. 
> 
> This is my data frame: 
> 
> data.frame':	5760 obs. of  21 variables:
> $ ID  [=subject level]       : Factor w/ 20 levels "OMI_01","OMI_02",..: 11 11 11 11 11 11 11 11 11 11 ...
> $ agegroup   : Factor w/ 2 levels "OLD     ","YOUNG   ": 2 2 2 2 2 2 2 2 2 2 ...
> $ session    : num  1 1 1 1 1 1 1 1 1 1 ...
> $ stim.cond [=treatment]: Factor w/ 2 levels "sham","tDCS": 1 1 1 1 1 1 1 1 1 1 ...
> $ time_point : num  -15 -15 -15 -15 -15 -15 -15 -15 -15 -15 ...
> $ time_point2: num  225 225 225 225 225 225 225 225 225 225 ...
> $ [log transformed ] outcome : num  NA 2.887 0.963 4.006 2.06 ...
> 
> Using nlme package, my current model looks like
> 
> summary(mR01A<- lme(lnSICIrest~factor(agegroup)*time_point*time_point2*factor(stim.cond),data=tDCSrest, random=~1|session/ID,na.action=na.exclude,method="REML"))
> 
> and 
> summary(mR01_corAR <- update(mR01, correlation = corAR1()))
> respectively.
> 
> 
> My questions are: 
> 1. Does the rather complex random effects structure is in any way reasonable or am I totally on the wrong path here?
> 
> 2. For the model with corAR1 correlation structure, 95% CI cannot be produced - the following error message is returned: "Cannot get confidence intervals on var-cov components: Non-positive definite approximate variance-covariance." 
> Is it necessary and appropriate in addition to specifying the random effects as above to account for the autocorrelation structure of the longitudinal data? Using anova to compare the models, I get a BIC change of -8.621 with a df increase of 2 when corAR1 correlation structure is added to the model. And if I do not need to include corAR1, would it be better to use the lme4 package or is it just a matter of taste?
> 
> 
> I would be very grateful for any thoughts and comments!
> 
> kirstin



More information about the R-sig-mixed-models mailing list