[R-sig-ME] lme: random effects for replicated growth curves

Ben Bolker bbolker at gmail.com
Mon Aug 19 21:38:56 CEST 2013


Adrien Combaz <Adrien.Combaz at ...> writes:

> 
> Dear nlme users,
 
> I am measuring the evolution of the brain response to a visual
> stimulation over time. The measures are done every seconds from 1
> second to 14 seconds (each measure at time t gives a value
> summarizing the magnitude of the brain response from time 0 to time
> t). I have 8 subjects (S1, ..., S8) and 2 experimental conditions
> (C0, C1). For each subject and condition I replicate the measurement
> 12 times. I obtain therefore for each subject and condition 12
> growth curves.

  Part of the reason this question may not have gotten the attention
it deserves is that it's rather long.  I know I often have the reaction
"hmm, that looks complicated, I don't have time to look at it right
now" to long/involved questions.  It is certainly sensible that you
want to explain the context of your problem and what you've already
tried, but it may be that some problems are just a bit too involved to
be easily tractable in a mailing list/forum format.


[snip]

An increase in variability over time would seem to be more sensibly
modeled by your second attempt (varStruct/heteroscedasticity) than
by your first (temporal autocorrelation); sometimes it can also
be handled by transformation (although that is likely to affect/mess up
linearity to some extent at the same time)
 
> As I didn't manage to use correlation structures, I tried to use
> variance functions to model heteroscedasticity: lm1 <- update(lm0,
> weights = varPower(form = ~ stimDuration)) But when looking at the
> residuals, it still displayed an increased variance over time. Same
> thing happened when using "varExp" or "varConstPower".

Did you make sure to use residuals(.,type="pearson") ? Otherwise,
the heteroscedasticity may be correctly modeled but the (raw) residuals
won't reflect that the model has taken the heteroscedasticity into
account (see also type="normalized", for models with correlation
structure: more generally, ?residuals.lme


  Good luck
    Ben Bolker



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