Thanks for all of your help, David, I finally got it. Here's some generic syntax in case it helps someone else down the road (using a 4-way ANOVA with repeated measures on all factors):
# LOAD DATA data <- read.table("PATH\\datafile.txt") # RUN THE ANOVA data.aov <- aov(y ~ factor(x1)*factor(x2)*factor(x3)*factor(x4) + Error(factor(id)/(factor(x1)*factor(x2)*factor(x3)*factor(x4))),data) # TO PRINT ALL MEANS BY EFFECT print(model.tables(data.aov,"means"),digits=3) # TO GET SEs FOR FACTOR x1 attach(data) foo <- data.frame(tapply(y,list(id,x1),mean)) mean(foo) # ANOTHER WAY TO GET MEANS, LIMITED TO FACTOR x1 # COMPUTE SEs FOR x1 sd(foo)/sqrt(nrow(foo)) SEs for an interaction can be had by: foo <- data.frame(tapply(y,list(id,x1,x2),mean)) sd(foo)/sqrt(nrow(foo)) David, thank you again for all of the help! Cheers, Jason On Dec 13, 2008 3:15pm, David Winsemius <dwinsem...@comcast.net> wrote: > > > On Dec 13, 2008, at 2:15 PM, js.augus...@gmail.com wrote: > > > > > > Does not this give you what you need? > > > model.tables(rawfixtimedata.aov,"means", se=TRUE) > > > > I tried that, but get an error: > > SEs for type 'means' are not yet implemented > > > > > I don't get that error. Using the example and this call > > > > model.tables(npk.aov,"means", se=TRUE) > > > > ....I get tables and then: > > > > Standard errors for differences of means > > block N P K N:P N:K P:K > > 2.779 1.604 1.604 1.604 2.269 2.269 2.269 > > replic. 4 12 12 12 6 6 6 > > > > Is your version of R current? > > > > > > > Maybe I'm not using the correct terminology to describe what I need to do. Using the main effect of Marking as an example, I have the following mean fixation times for each of 12 subjects: > > > > > > txt > + 1 1278 586 > > + 2 2410 571 > > + 3 408 477 > > + 4 645 371 > > + 5 265 415 > > + 6 4871 354 > > + 7 1878 790 > > + 8 6064 592 > > + 9 761 363 > > + 10 1073 566 > > + 11 1043 383 > > + 12 1170 290" > > > > > marking.t , header=TRUE, row.names="Sub") > > > marking.t > > Absent Present > > 1 1278 586 > > 2 2410 571 > > 3 408 477 > > 4 645 371 > > 5 265 415 > > 6 4871 354 > > 7 1878 790 > > 8 6064 592 > > 9 761 363 > > 10 1073 566 > > 11 1043 383 > > 12 1170 290 > > > > That list copied into R produces this pair of means > > > > > mean(marking.t) > > Absent Present > > 1822.1667 479.8333 > > > > > > > > > > > > > The means for markings present and absent, respectively, as reported by both R and SPSS were: > > factor(marking) > > Present Absent > > 480 1822 > > > > > > > > > > > > > > The standard errors for these means, SE(x) = SD(x)/sqrt(n), should be: > > Present Absent > > 41.42 525.55 > > > > > > sd(marking.t)/sqrt(nrow(marking.t)) > > Absent Present > > 525.58353 41.44599 > > > > > > > > > > > > > Which is what SPSS gives. I need to know how to get R to compute the same values. > > > > Any suggestions? > > > > Thanks, > > > > Jason > > > > > > > > > > > > > > > > > > > > > > [[alternative HTML version deleted]] ______________________________________________ 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.