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

Thierry Onkelinx thierry@onkelinx @ending from inbo@be
Mon Jan 7 10:22:19 CET 2019


Dear Clark,

Have you tried something like corAR1(form = ~time|subj/period) This uses
explict nesting. Your code uses implicit nesting and lme doesn't handle
that.

Best regards,

ir. Thierry Onkelinx
Statisticus / Statistician

Vlaamse Overheid / Government of Flanders
INSTITUUT VOOR NATUUR- EN BOSONDERZOEK / RESEARCH INSTITUTE FOR NATURE AND
FOREST
Team Biometrie & Kwaliteitszorg / Team Biometrics & Quality Assurance
thierry.onkelinx using inbo.be
Havenlaan 88 bus 73, 1000 Brussel
www.inbo.be

///////////////////////////////////////////////////////////////////////////////////////////
To call in the statistician after the experiment is done may be no more
than asking him to perform a post-mortem examination: he may be able to say
what the experiment died of. ~ Sir Ronald Aylmer Fisher
The plural of anecdote is not data. ~ Roger Brinner
The combination of some data and an aching desire for an answer does not
ensure that a reasonable answer can be extracted from a given body of data.
~ John Tukey
///////////////////////////////////////////////////////////////////////////////////////////

<https://www.inbo.be>


Op wo 2 jan. 2019 om 20:40 schreef Kogan, Clark <clark.kogan using wsu.edu>:

> 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]]
>
> _______________________________________________
> R-sig-mixed-models using r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-sig-mixed-models
>

	[[alternative HTML version deleted]]



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