[R-sig-ME] different VarCov structures for different levels of grouping with lme
sylvain willart
sylvain.willart at gmail.com
Wed Jan 20 15:23:57 CET 2010
Hello all,
I am struggling for a while with a problem of model specification,
I don't know if it is possible, but I would like to fit a nested model
where subjects are autocorrelated with respect to time (AR1), and
goups are correlated with respect to their spatial position...
with (i) the subjects, observed through time (t), and grouped with
respect to (g) : Y(git)
because of the AR1 structure, I am using nlme library, I tried the
multiple random instruction:
random = list(Group = ~ 1 , Subject = ~ 1 )
but I don't know how to specify that each of the random term have its
own covariance structure:
corAR1 for time within subject
corGauss for subject within group
If it helps, this is to apply a marketing model of stores sales
(subject are stores) observed over several weeks (time), and stores
are correlated when they are geographically close to each other
(variogram on averaged sales over time shows gaussian correlation , I
used spdep to construct a neighbourhood matrix)
Thanks in advance,
Sylvain
More information about the R-sig-mixed-models
mailing list