On 10/23/2009 1:30 PM, slreiner at vims.edu wrote:> Hello-
> I have run an ANOVA on 4 treatments with unequal sample sizes (n=9,7,10
and 10). I want to determine where my sig. differences are between treatments
using a Bonferroni test, and have run the code:
>
> pairwise.t.test(Wk16, Treatment, p.adf="bonf")
>
> I receive an error message stating that my arguments are of unequal length:
>
> Error in tapply(x, g, mean, na.rm = TRUE) :
> arguments must have same length
>
> Is there a way to run this test even with unequal sample sizes?
Unequal sample sizes are not causing the reported error. The problem
is that 'Wk16' and 'Treatment' do not have the same number of
observations. If the group sizes are 9, 7, 10, and 10, then 'Wk16' and
'Treatment' should each contain 36 observations.
> Thanks.
> Stephanie Reiner
> Andrews Hall 410
> Shipping: Rt. 1208 Greate Road
> Gloucester Point, VA 23062
> work: 804-684-7869
> cell: 443-286-4795
>
> ______________________________________________
> R-help at 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.
--
Chuck Cleland, Ph.D.
NDRI, Inc. (www.ndri.org)
71 West 23rd Street, 8th floor
New York, NY 10010
tel: (212) 845-4495 (Tu, Th)
tel: (732) 512-0171 (M, W, F)
fax: (917) 438-0894