[R-sig-ME] AR1 within test bouts with random intercept

Kogan, Clark cl@rk@kog@n @ending from w@u@edu
Wed Jan 2 20:39:58 CET 2019


Hi,

I am trying to fit a linear mixed effects model that has a random effect for subject and an AR1 correlation structure for time within period, where period is nested within subject. I am happy to treat time as either discrete or continuous - the time intervals within a period are all the same. I attempt to fit the following model and get an error.

mod <- lme(agg ~ tx_group + day + tx_group*day, random = ~1|subj, correlation = corAR1(form = ~time|subj_period), data = pw)


Error in lme.formula(agg ~ tx_group + day + tx_group * day, random = ~1 |  :
  incompatible formulas for groups in 'random' and 'correlation'

>From a little online reading, it seems that lme likes to have the same grouping factor for the random effects and the correlation. I was wondering whether there are other tools that are currently available to fit this type of correlation structure.

Thanks,
Clark Kogan

	[[alternative HTML version deleted]]



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