Skip to content
Prev 43035 / 398506 Next

repeated measurements with R

R can handle some repeated measurements designs with the 'Error' term in 
the formula provided to aov.
(see the section on multistratum models in MASS)
(if you can read French, some examples are provided  in a small tutorial 
about R available at 
http://www.pallier.org/ressources/stats_with_R/stats_with_R.pdf (work in 
progress)).

More complex designs can be analysed with lme (described in the book 
Mixed Effects models in S and S-PLUS by Pinheiro and Bates)
 
But, you should first precise your questions, that is make clear what is 
the unit of analysis, and wether
 'solution', 'nr.filter' and 'nr.measures'  are random or fixed factors.

*Maybe* your problem can be desribed in the following way (?)

you had twelve samples (=filtered solutions) which came from two 
solutions and you applied the same 6 different filtering processes to each
of these samples. Solution and nr.filter are fixed factors, and you are 
interested in assessing their main effects and interaction.

If this is indeed the structure of your problem, then you should define 
a new factor 'sample' with 12 levels equal to 'solution:nr.measure', and 
use the following formula for the anova:

summary(aov(conc~solution*nr.filter+Error(sample/nr.filter)))

Do not use this if you do not understand the hypotheses underlying this 
approach.
For example, if you believe that there is an effect of the time at which 
the samples
were taken from the solution, then this approach is not valid.

If solution and/or filter are  random factors, then the analysis will 
also differ...

Christophe Pallier
www.pallier.org