Hi:

This sounds like a 'doubly repeated measures problem'. Are any treatments
assigned to individuals or is this a purely observational study?

Is the time horizon of the between-visit factor (much?) longer than that of
the within-visit factor? You could try to assess the strength of correlation
of measurements between visits; if it's close to zero, you might be able to
get away with treating visit as a non-repeated measures factor, which would
simplify the analysis.

If not, then the between-visit factor is nested within subject and the
within-visit factor is nested within visits (obviously :) within subjects,
so you would have one within-subject correlation structure to deal with for
visits and another for times within visits. The question comes down to how
easily the form of the overall covariance matrix can be specified.

 It's within the realm of possibility that the within-visit relationship is
nonlinear in time (as in any number of pharmacokinetic models). If the
visits are more or less uncorrelated in time, it might be reasonable to
combine the data over visits in the hope that leads to a better fitting
model. In that (comparatively happy) situation, the nlmer() function in the
lme4 package (or the nlme() function in package nlme) would be a good place
to look.

If it is necessary for you to deal with two types of nontrivial
within-subject correlation, then I'm not so sure that nlme/lme4 is the right
path to follow, but I'm not a mixed model expert so I could easily be wrong
about that and others with more expertise are welcome to chime in with
alternatives.

You might also consider sending the initial mail and follow-ups to the
R-mixed-models list, to which you can subscribe from here if you're not a
list member:

http://www.r-project.org/mail.html

Scroll down to the bottom of the web page to find the list of special
interest groups (SIGs).

Sounds like an interesting problem...

Cheers,
Dennis

On Mon, Nov 8, 2010 at 10:02 PM, Paul Rheeder <Paul.Rheeder@up.ac.za> wrote:

> dear List
> I have a dataset with blood measurements at 5 points in TIME
> (0,30,60,90,120) taken on 3 VISITS (same subjects). the interest is to
> compare these measurements between Visits, overall and at the different time
> points.
>
I have problems setting up repeated measures ANOVA with 2 repeated measures
> (VISIT and TIME) (and then doing post hoc testing) or doing it with a linear
> mixed model ( both VISIT and TIME are repeated).
> Any suggestions?
> Paul
>
>
> Prof P Rheeder
> School of Health Systems and Public Health
> Faculty of Health Sciences
> University of Pretoria
> Room 6:12
> HW Snyman North
> Tel: 012 354 1488
> Fax: 012 354 1750
> Mobile: 082 779 3054
>
>        [[alternative HTML version deleted]]
>
> ______________________________________________
> R-help@r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide
> http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
>

	[[alternative HTML version deleted]]

