Skip to content

Converting anova/ancova summary to data frame

3 messages · Shane Phillips, Uwe Ligges, David Winsemius

#
On 31.08.2011 22:33, Shane Phillips wrote:
For the first component of such an object:

as.data.frame(summary.aov_object[[1]])


Uwe Ligges
#
On Aug 31, 2011, at 4:33 PM, Shane Phillips wrote:

            
Which parts do you want? Or how do you want it displayed? And why  
didn't you include a working example, anyway?

Using the examples in the help(lm) and help(summary.lm) pages:

 > as.data.frame( anova(lm.D90) )
           Df    Sum Sq     Mean Sq  F value       Pr(>F)
group      2 470.45945 235.2297250 485.0514 2.209191e-16
Residuals 18   8.72925   0.4849583       NA           NA

 > as.data.frame( coef(sld90) )
          Estimate Std. Error  t value     Pr(>|t|)
groupCtl    5.032  0.2202177 22.85012 9.547128e-15
groupTrt    4.661  0.2202177 21.16542 3.615345e-14
David Winsemius, MD
West Hartford, CT