[R] ANOVA tables - storing F values

Greg Snow Greg.Snow at imail.org
Tue Aug 12 22:30:26 CEST 2008


You need to store the result of the summary function:

> sfit <- summary(fit)

Then look at the structure of the sfit (or whatever you call it) object (depending on the fit, it may be different).  You can do this with the 'str' function or the 'TkListView' function in the TeachingDemos package for a more interactive view.  The F stats will probably be a column in a matrix named coefficients, just extract them from there.

Hope this helps,

--
Gregory (Greg) L. Snow Ph.D.
Statistical Data Center
Intermountain Healthcare
greg.snow at imail.org
(801) 408-8111



> -----Original Message-----
> From: r-help-bounces at r-project.org
> [mailto:r-help-bounces at r-project.org] On Behalf Of Gareth Campbell
> Sent: Monday, August 11, 2008 8:51 PM
> To: R Help
> Subject: [R] ANOVA tables - storing F values
>
> When I run a summary(anova) I get output for all of the
> elements (columns) as these are multiple - single anova
> results.  Can I store the F values?  I can't find the
> attribute of the fitted model attributes(fit) that stores
> these F values, and for that matter, P values.
>
> Thanks
>
> --
> Gareth Campbell
> PhD Candidate
> The University of Auckland
>
> P +649 815 3670
> M +6421 256 3511
> E gareth.campbell at esr.cri.nz
> gcam032 at gmail.com
>
>         [[alternative HTML version deleted]]
>
> ______________________________________________
> R-help at 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.
>



More information about the R-help mailing list