I am relatively new to R and I have problem figuring out why the data file
appear to be read in fine, but the one way ANOVA is not calculated
correctly. In other problems this works fine.

This program is listed at the end, and the small text file in online.

There are 24 data points in three groups of 8. Thus DF should be 3-1=2, not
1, and the residuals should be 24-1=23, not 22.

I also get the warning,

> print(model.tables(aov.ex1,"means"),digits=3) #report the means and the
number of subjects/cell
Warning in replications(paste("~", xx), data = mf) :
non-factors ignored: Approach

The grand mean is correct, but the mean for each group is not?

Any pointers would be appreciated.

Thanks,

Johnny Liseth
Stat. Grad Student

#tell where the data come from
datafilename="http://students.uwf.edu/ojl2/DE/prob3-5.txt"
data.ex1=read.table(datafilename,header=T)                       #read the
data into a table
aov.ex1 = aov(Contributions~Approach,data=data.ex1)        #do the analysis
of variance
summary(aov.ex1)
 #show the summary table
print(model.tables(aov.ex1,"means"),digits=3)
boxplot(Contributions~Approach,data=data.ex1) #graphical summary

	[[alternative HTML version deleted]]

