I'm not convinced you need the time effect, either as fixed or random. I'm
happy to be contradicted, but I think you only need time effects if you
expect a temporal trend in phenotype. The model you fitted is estimating
this trend and how it varies among patients, doctors and clinics. To my
mind, if you only want to account for the fact that observations are
repeated, you can do so with this, much simpler, model:

lmer(phenotype ~ gene + (1|patient) + (1|doctor) + (1|clinic), data2,
na.action = na.omit)

If you were interested in the trend over time, you might want to test
whether its nonlinear, with this more complicated model:

lmer(phenotype ~ gene + poly(time,2) + (poly(time,2)|patient) +
(poly(time,2)|doctor) + (poly(time,2)|clinic), data2, na.action = na.omit)

Finally, none of these models accounts for the fact that phenotype might
depend not just on which doctor measured it, but also on which doctor
measured it previously. This kind of structure is called 'multiple
membership'. I've no real experience with these models and I wouldn't know
how to fit one in lmer. However, you can read about them in chapter 15 of
this document:
http://www.cmm.bristol.ac.uk/MLwiN/download/MCMC%20est_2005.pdf

Best wishes, Nick



2009/1/21 Marie-Pierre Sylvestre <sylvestre@lunenfeld.ca>

> Dear lme4 users,
>
> I would like to use the group as a sound board for the analysis that I am
> performing and ask a question on residual autocorrelation.
>
> The data structure is as follows:
> 1000 PATIENTs are tested for a particular PHENOTYPE level repeatedly over
> time. Each patient has 5 measures.
> These PHENOTYPE tests are performed by 163 physicians. Each PHYSICIAN
> belongs to one and only one of the 63 clinics (perfect nesting). CLINICs
> differ in their numbers of physicians.
>
> However, patients can be tested by different physicians over time so that
> patient are NOT perfectly nested in physicians. Patients can be seen by
> doctors from different clinics.
>
> My aim is to build a model that will quantify the association between a
> specific SNP (gene) and PHENOTYPE, accounting for the repeated measures and
> the partially nested structure of the data. I believe that both doctors and
> clinic may have an effect on the measurement of the phenotype.  By the way,
> I am sorry that I can't post the data on the web as they are confidential.
>
> >From reading messages posted on the list  + a paper by Baayen, Davidson,
> and Bates (2008), I get the feeling that lme4 is capable of dealing with
> such partially crossed structure of random effects. Also, in RNews May 2005,
> it is said that "In lmer, one simply provides multiple random-effect
> expressions and the determination of nested or non-nested is done in the
> code".
>
> Now, I am unsure about the syntax for the formula. To me, I need
> (time|patient) to indicate the repeated nature of PHENOTYPE measurement
> within patients over time. Next, I need to specify the physician and clinic
> effect.
>
> The following model
>
> m1 <-  lmer(phenotype ~ gene + time + (time|patient) + (time|doctor) +
> (time|clinic), data2, na.action = na.omit),
>
> can be estimated and provides reasonable results.
>
> Is this model properly taking into account the patient, doctor, clinic
> structure???
>
> ***
>
> In addition, when I perform some checks for the fit of the model, I get the
> following autocorrelation (ACF) results for the residuals. I wish I could
> send a plot but here are the numbers:
>
> Autocorrelations of series 'residuals(m1)', by lag
>
>     0      1      2      3      4      5      6      7      8      9     10
>  1.000 -0.150 -0.162 -0.068 -0.021  0.037 -0.007 -0.006 -0.017  0.011
>  0.012
>    11     12     13     14     15     16     17     18     19     20     21
> -0.016  0.009  0.003 -0.002  0.022 -0.009 -0.020  0.013 -0.002  0.022
>  0.008
>    22     23     24     25     26     27     28     29     30     31     32
> -0.016 -0.015  0.017 -0.007  0.002 -0.030  0.005  0.005  0.004  0.011
> -0.017
>    33     34     35     36     37     38
>  0.007  0.007  0.003 -0.030  0.016 -0.001
>
> As you can see, the autocorrelation is negative and it decreases to values
> near zero after 2-3 lags. I am not used to such negative values. Assuming
> the model above is valid, should I be concerned with these autocorrelations?
> If so, what can I do? I believe that the "correlation=corAR1" specifications
> in nlme are not available in lme4, but I am not even sure if this would even
> help in my case.
>
> I would be grateful for any comments you may have, or even pointers to
> relevant literature.
>
> MP
>
>        [[alternative HTML version deleted]]
>
>
> _______________________________________________
> R-sig-mixed-models@r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-sig-mixed-models
>
>

	[[alternative HTML version deleted]]


