apsawant <apsawant <at> yahoo.com> writes: > > > I am trying to run a simple example script to calculate AOV. > Below is the script file (aov.R) I am trying to execute: > aov.R > ------ .... > aov(rt - shape * color + Error(subj/(shape * color)), data=Hays.df) > > summary(aov(rt - shape * color + Error(subj/(shape * color)), data=Hays.df))
The - in the formula is wrong, it should be ~ Dieter #------- data1<-c(49,47,46,47,48,47,41,46,43,47,46,45,48,46,47,45,49,44,44,45,42,45,45,40 ,49,46,47,45,49,45,41,43,44,46,45,40,45,43,44,45,48,46,40,45,40,45,47,40) Hays.df<-data.frame(rt = data1, subj=factor(rep(paste("subj", 1:12, sep=""), 4)), shape=factor(rep(rep(c("shape1","shape2"), c(12, 12)), 2)), color=factor(rep(c("color1","color2"), c(24, 24)))) aov(rt ~ shape * color + Error(subj/(shape * color)), data=Hays.df) summary(aov(rt ~ shape * color + Error(subj/(shape * color)), data=Hays.df)) ______________________________________________ R-help@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.