#Biostatistics 290 #BALANCED TWO-WAY ANOVA #FIXED EFFECTS (ANOVA MODEL I) #ZAR EXAMPLE 12.1 ZAR=read.table("ZarEX12.1R.txt") ZAR attach(ZAR) A=factor(treatment) B=factor(sex) Y=calcium g=factor(group) options(digits=9) anova(lm(Y~A+B+A:B)) #FACTORS A,B PLUS A:B INTERACTION anova(lm(Y~A*B)) # SIMPLER EQUIVALENT FORMULA