[R]: Bug in Error() and the use of Error() for repeated measures with more than 2 fa ctors
Peter Ho
peter at esb.ucp.pt
Mon Aug 19 13:45:47 CEST 2002
I forgot to mention that this analysis was carried out using the Windows
version .
Perhaps this problem is windows specific.
Peter
Peter Ho wrote:
> Prof. Ripley,
>
> I am sending this to you again, as the first one was undelivered.
>
>
> Peter
>
> ripley at stats.ox.ac.uk wrote:
>
>
>>> There is no intended limit, but there was a bug fix in 1.5.0. If this
>>> is using 1.5.x, could you send me an example that malfunctions?
>>>
>>>
>>
>>
>
> I have attached the .Rdata file with the dataframe
> simulation.6batches.aovdata. The scripts are the same ones used in the
> previous email
>
> This analysis was carried out using:
>
> R : Copyright 2002, The R Development Core Team
> Version 1.5.1 (2002-06-17)
>
>
>
> Peter
>
>
>
>>> Brian
>>>
>>> On Wed, 14 Aug 2002, Peter Ho wrote:
>>>
>>>>> 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.aovdat
>>>>>
>>>>
>>>
>>
> a)
>
>>>>>
>>>>> 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