[R] Testing significance in a design with unequal but proportional sample sizes
Christophe Pallier
pallier at lscp.ehess.fr
Fri Mar 5 18:30:29 CET 2004
Prof Brian Ripley wrote:
>On Fri, 5 Mar 2004, pallier wrote:
>
>...
>
>
>
>>Actually, the different types of main effects defined above just
>>correspond to different
>>contrasts on the cell means. So if there is an easy solution to compute
>>arbitrary contrasts
>>on the cell means in a factorial design, this could an approach to this
>>question. (Anyone?)
>>
>>
>
>There are at least three such ways. ?contrasts (for the assignment
>function contrasts<-) and ?C, as well as the contrasts= argument to aov
>(the function you were discussing ...).
>
>
Thanks.
I know the existence of 'contrasts' and I read the section about
contrasts matrix in your book (MASS 3rd edition), as well as
in the R online documentation, but I probably do not understand them
well: It still escapes me how to proceed to compute
"arbitrary" contrasts, such as, say:
a1b1 a1b2 a2b1 a2b2
1 1 -1 -1
a1b1 a1b2 a2b1 a2b2
.5 .5 -1 0
in a model "x~ a * b" where a and b are two binary factors.
(the contrasts should be on the cell means, ignoring the sample size of
subgroups. I know how to compute the size of the contrasts from the
table of means returned by tapply, but I whould also need the associated
MSE).
Sorry if the solution is obvious.
Christophe Pallier
More information about the R-help
mailing list