Dear R experts,

I'm beginner.
My question about ANOVA for unequal sample sized data should be obsolete but
I can not clarify it.

I have a dataset from 23 males and 18 females.
I measured one condition('cond') with 4 levels.
So I'd like to see main effect of gender, cond and gender by cond
interaction and also postHoc test. (In fact, I have to do anova 90 times)
*
1. Question about constrast stuff for type III*
After googling, I found a document (
https://stat.ethz.ch/pipermail/r-help/2001-October/015889.html) and it
looked like make sense.
This below is what I did on R and I encountered 'error message'.

library(car)
results_lmanova <- list()
for(i in 1:90) {sum=subset(ast.ast_coef, ast.ast_coef$coef_thr==i)
                results_lmanova[[i]] <- anova(lm(sum$ast.values ~ sum$gender
* sum$cond,
                                     contrasts=list(sum$gender='contr.sum',
sum$cond='contr.sum'),
                                      type='III'))

If remove the row of 'contrasts=....', some results showed up and my anxiety
also did..
Even if change from 'contr.sum' to 'contr.sum(2)' for gender and to
'contr.sum(4)' for cond, it did not work. And my brain also did not.

Please let me know what is error in my command.

*2. Question about postHoc test*
In my understand, TukeyHSD is for the results of aov() with type I, not
anova() with type III which is I used.
Please let me know what is the best postHoc test for the results from
anova() with type III.
Is multcomp a way?

thank you,

Jeong

	[[alternative HTML version deleted]]

