[R] extracting p-value of aov F-statistic

Chuck Cleland ccleland at optonline.net
Mon Jun 14 21:59:25 CEST 2004


Sven:
   A suggestion from Peter Dalgaard in the archives:

http://tolstoy.newcastle.edu.au/R/help/01a/2097.html

data(warpbreaks)

LZ.aov <- summary(aov(breaks ~ wool + tension, data = warpbreaks))

as.matrix(LZ.aov[[1]][,5])
             [,1]
[1,] 0.073613669
[2,] 0.001377778
[3,]          NA

hope this helps,

Chuck Cleland

Sven Hartenstein wrote:
>>>I would like to extract the p-value of the F-statistic of a aov-object's
>>>summary.
>>>
>>>Getting the p-value is so easy with t-tests (t.test(g1, y = g2,
>>>var.equal = FALSE)$p.value), but I couldn't find anything like that for
>>>ANOVAs.
> 
> 
>>Maybe something like:
>> >?summary.aov
>>will give you a clue
> 
> 
> Unfortunately not. I already checked summary, aov and lm help pages.

-- 
Chuck Cleland, Ph.D.
NDRI, Inc.
71 West 23rd Street, 8th floor
New York, NY 10010
tel: (212) 845-4495 (Tu, Th)
tel: (732) 452-1424 (M, W, F)
fax: (917) 438-0894




More information about the R-help mailing list