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:
- What does this
correlation
argument correspond to? The structure of covariance of what? Is that the var-cov matrix which I defined as R? - Does the line actually do what I would like to?
- If not, what does it do?
- If not, is there a way to do what I would like to?
Thank you in advance!