[R] Standard error of mean for aov

David Winsemius dwinsemius at comcast.net
Sat Dec 13 21:15:37 CET 2008


On Dec 13, 2008, at 2:15 PM, JS.Augustyn at 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 <-"Sub	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"

 > marking.t <- read.table(textConnection(txt), 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
>
>
>
> >
> >
> >
> >



More information about the R-help mailing list