[R]: use of Error() for repeated measures with more than 2 factors

Peter Ho peter at esb.ucp.pt
Wed Aug 14 17:15:03 CEST 2002


I have been trying to analyse an unreplicated repeated measures 2-level 
factorial design with 11 factors using aov() with Error(), similar to 
that described in  "Notes on the use of R for psychology experiments and 
questionnaires" by Jonathan Baron and  Yuelin Li (see the example of Hay's)

I have found that there seems to be a limit, in the number of factors in 
Error() . For example,  the following worked :

aov(CV ~(Twb+Plb+Psb+tinsb+tseedb+Tmb+Mcb+Mom0b+Mom1b+Mom2b+Mom3b)^3 + 
Error(Batch / 
(Twb+Plb+Psb+tinsb+tseedb+Tmb+Mcb)),simulation.6batches.aovdata)

but not:

aov(CV ~(Twb+Plb+Psb+tinsb+tseedb+Tmb+Mcb+Mom0b+Mom1b+Mom2b+Mom3b)^3 + 
Error(Batch / 
(Twb+Plb+Psb+tinsb+tseedb+Tmb+Mcb+Mom0b+Mom1b)),simulation.6batches.aovdata)

which I suppose should be the right way to code the strata.formula for 
11 fixed factors. Returned the following reply after running this script:

 >Error in eval(expr, envir, enclos) : couldn't find function "Error"

The only difference between the two scripts is the second one contains 
all 11 factors. Is this a bug? Or should I be using lme() or some other 
function when the number of factors is greater than the "limit"?

I would also like to hear some views as to whether Error() should be 
used for repeated measures, pro & cons,etc? I have found differing views 
in books. For example, Neter et al  "applied linear statistical models " 
uses simply the combined treatment by subject interaction mean square 
when testing main effects and their interactions. They do state that the 
relaxation of the assumptions of a repeated measures model can be made 
by the inclusion of first-order interaction between each factor and 
subjects in the model. However, this still falls short of the ideas 
suggested with using Error() for testing.On the other hand,  Mead's "the 
design of experiments puts repeated measures in the same chapter with 
split unit design, which are multistratum design. Jonathan Baron's and 
 Yuelin Li's document also references a number of books on this matter.

I know that this point is not really suitable for r-help, but it is 
related indirectly with regard to the use of strata.formula in Error().


Any comments would be grateful


Peter Ho
ISR-Porto



-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._



More information about the R-help mailing list