Hi:

On Fri, Oct 8, 2010 at 2:47 PM, array chip <arrayprofile@yahoo.com> wrote:

> Hi, I have an ophthalmology dataset, that has as response variable "y",
> patient
> ID (pid), visit (0,1,2) and eye examined ("L' and "R").
>
> Basically, each patient has 3 visit, during each visit, both eyes will be
> assessed and produce response measurements. The first question is should I
> treat
> eye.examined and visit as crossed or nested? I think it should be treated
> as
> crossed because each eye will be assessed in each visit. On the other hand,
> the
> 2 measurements from the 2 eyes were from a given visit, so it looks like it
> can
> be treated as nested as well (eye %in% visit).
>

Rather, eye %in% patient.

Is a treatment involved with the patients? None was mentioned.

As far as the nesting/crossing issue with eyes is concerned, an alternative
view is that it is both. Based only on the description above, one could
conclude the following *if* the above information is complete:

     * Each patient has three visits  => visits are replications
     * It is the patient who attends the visit - the eyes come along for the
ride :)
       Thus, the patient is the experimental/sampling unit and the eyes are
observational units
       (inherently) nested within patient.
    * Since each eye is measured on a given patient per visit, one can view
this
      as either a bivariate response or duplicate measurements, depending on
what is
      being measured on each eye within visit. If the same assessment is
given on each eye, one
      could interpret the responses as duplicate/paired measurements (i.e.,
correlated).
      The bivariate response interpretation may be useful if within-person
contrasts on
      the eyes are of interest.

If no treatment condition(s) was/were employed, with what are eyes supposed
to be crossed? It can't be the visit because the patient attends the visit,
so the unit of analysis at the visit level is the patient.

Basically, for a given patient, you have between-visit variation and
within-visit variation, which is reminiscent of a multistage sampling
design. Based on your description, this is loosely analogous to an
industrial process variation study:

Batch    ->  multiple samples from batch  -> subsamples from sample  ->
measurements
Patient  ->   multiple visits to clinic  ->  two eyes per patient  ->
measurements

The analogy is not perfect, because different samples divide into distinct
subsamples, whereas the same eyes are measured on each visit, so the
situation is not completely nested. If we view the patient as a (whole-plot)
block, then the visits could be interpreted as split plots. The measurements
on each eye are almost certainly correlated within and between visits, so
one approach to the problem could be to treat it as bivariate repeated
measures. Currently, that approach is more synonymous with MANOVA.

Just my 2c,
Dennis

>
> The second question is, no matter which way I use, lmer() gives me error
> message, while lme() from nlme package can handle nested design easily.
> Also, is
> there a way to specify corssed design in lme() as well?
>
>
> > dat <- read.table ("dat.txt", sep='\t', row.names=1, header=T)
> > library(nlme)
>
>    ### nested using lme
> > lme(y~1, random=~1|pid/visit/eye,dat)
> Random effects:
>  Formula: ~1 | pid
>        (Intercept)
> StdDev:    2.881611
>
>  Formula: ~1 | visit %in% pid
>        (Intercept)
> StdDev:   0.8154632
>
>  Formula: ~1 | eye %in% visit %in% pid
>        (Intercept)  Residual
> StdDev:    1.065172 0.5321993
>
>    ### nested using lmer
> > lmer(y~1+(1|pid/visit/eye),dat)
> Error: length(f1) == length(f2) is not TRUE
> In addition: Warning messages:
> 1: In visit:pid :
>  numerical expression has 718 elements: only the first used
> 2: In visit:pid :
>  numerical expression has 718 elements: only the first used
>
>    ### crossed
> > lmer(y~1+(1|pid/visit)+(1|pid/eye),dat)
> Error: length(f1) == length(f2) is not TRUE
> In addition: Warning messages:
> 1: In visit:pid :
>  numerical expression has 718 elements: only the first used
> 2: In visit:pid :
>  numerical expression has 718 elements: only the first used
> 3: In eye:pid : numerical expression has 718 elements: only the first used
> 4: In eye:pid : numerical expression has 718 elements: only the first used
>
>
> Can anyone share their thoughts.
>
> Thanks
>
> John
>
>
>
> _______________________________________________
> R-sig-mixed-models@r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-sig-mixed-models
>
>

	[[alternative HTML version deleted]]


