1

My response variable is Yijk corresponding to the recovery time of

  • patient i (i=1,...,I)
  • with treatment j (j=1,...,J)
  • and measured at time k (k=1,...,K)

I would like to fit the following model:Model equation, where:

  • μ is a global fixed intercept
  • αj is a fixed effect for the treatment
  • bik is a random effect with the following covariance structure. Denote bi the K-dimensional vector of effect for the patient i, then its variance-covariance matrix would have the following AR(1) structure. Variance covariance matrix
  • uijk is the usual error term with variance σ²

Consider the following line of command:

lme(recovery ~ treatment, method="REML", random=~1|patient, correlation=corAR1,form=~time|patient,data=data)

Several questions:

  1. What does this correlation argument correspond to? The structure of covariance of what? Is that the var-cov matrix which I defined as R?
  2. Does the line actually do what I would like to?
  3. If not, what does it do?
  4. If not, is there a way to do what I would like to?

Thank you in advance!

Jack4280
  • 35
  • 1
  • 6

1 Answers1

0

First, you have a command lme, I will assume that is meant to be nlme because a) lme isn't an R command in any package that I know of or that R could find and b) correlation isn't an option in lme4

Second, in the documentation for nlme they have this:

an optional corStruct object describing the within-group correlation structure. See the documentation of corClasses for a description of the available corStruct classes. Defaults to NULL, corresponding to no within-group correlations.

and in corClasses it says

corAR1 autoregressive process of order 1.

So, the answers to your first two questions appears to be "Yes".

Peter Flom
  • 2,008
  • 4
  • 22
  • 35