[R] Linear and cuadratic effects
Alma Cristina Núñez del Toro
amla20 at hotmail.com
Thu Nov 24 00:12:38 CET 2005
I'd like to know how to obtain a table of anova of a 3^2 desing with
linear and cuadratic sum of squares because if I use "aov", this
comand only bring me the linear sum of squares:
> A<-rep(c(rep(-1,3),rep(0,3),rep(1,3)),2)
> B<-rep(rep(c(-1,0,1),3),2)
>
y<-c(1.5,1.4,0.8,3.5,2.9,1.8,4,3.8,2.7,1.2,1.3,1.2,3.2,2.5,2,4.2,3.4,3
)
> anova(aov(y~(A*B)))
Analysis of Variance Table
Response: y
Df Sum Sq Mean Sq F value Pr(>F)
A 1 15.6408 15.6408 204.0109 9.711e-10 ***
B 1 3.1008 3.1008 40.4457 1.769e-05 ***
A:B 1 0.4050 0.4050 5.2826 0.03746 *
Residuals 14 1.0733 0.0767
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
Thanks a lot ,
Cristina
More information about the R-help
mailing list