Df Pillai approx F num Df den Df Pr(>F)
plankton.new[, 1] 1 0.5267 9.8316 6 53 2.849e-07 ***
Residuals 58
---
Signif. codes: 0 `***' 0.001 `**' 0.01 `*' 0.05 `.' 0.1 ` ' 1
My understanding is the MANOVA summary returns a list. However I am not
sure how to extract out only part of the list. For example is I want to
extract the Pillai's test statistic, 0.5267, how can I do this?
Cheers,
Kevin
------------------------------------------------------------------------------
"On two occasions, I have been asked [by members of Parliament],
'Pray, Mr. Babbage, if you put into the machine wrong figures, will
the right answers come out?' I am not able to rightly apprehend the
kind of confusion of ideas that could provoke such a question."
-- Charles Babbage (1791-1871)
---- From Computer Stupidities: http://rinkworks.com/stupid/
--
Ko-Kang Kevin Wang
Master of Science (MSc) Student
SLC Tutor and Lab Demonstrator
Department of Statistics
University of Auckland
New Zealand
Homepage: http://www.stat.auckland.ac.nz/~kwan022
Ph: 373-7599
x88475 (City)
x88480 (Tamaki)
On Sat, 2003-06-07 at 18:43, Ko-Kang Kevin Wang wrote:
Hi,
Suppose I have:
summary(manova(plank.man))
Df Pillai approx F num Df den Df Pr(>F)
plankton.new[, 1] 1 0.5267 9.8316 6 53 2.849e-07 ***
Residuals 58
---
Signif. codes: 0 `***' 0.001 `**' 0.01 `*' 0.05 `.' 0.1 ` ' 1
My understanding is the MANOVA summary returns a list. However I am not
sure how to extract out only part of the list. For example is I want to
extract the Pillai's test statistic, 0.5267, how can I do this?
Kevin,
To use the example from ?summary.manova, since I don't have your data:
## Example on producing plastic film from Krzanowski (1998, p. 381)
Df Pillai approx F num Df den Df Pr(>F)
rate 1 0.6181 7.5543 3 14 0.003034 **
additive 1 0.4770 4.2556 3 14 0.024745 *
rate:additive 1 0.2229 1.3385 3 14 0.301782
Residuals 16
---
Signif. codes: 0 `***' 0.001 `**' 0.01 `*' 0.05 `.' 0.1 ` ' 1
If you then use:
str(summary(fit))
You will note at the bottom, the following:
...
$ stats : num [1:4, 1:6] 1.000 1.000 1.000 16.000 0.618 ...
..- attr(*, "dimnames")=List of 2
.. ..$ : chr [1:4] "rate" "additive" "rate:additive" "Residuals"
.. ..$ : chr [1:6] "Df" "Pillai" "approx F" "num Df" ...
- attr(*, "class")= chr "summary.manova"
In this case 'stats' is a 4 by 6 matrix with defined dimnames. Thus to
get the individual statistics (ie. "Pillai"), use:
summary(fit)$stats[, "Pillai"]
rate additive rate:additive Residuals
0.6181416 0.4769651 0.2228942 NA
The use of str(object) will provide you with the internal structure of
the object, which in turn will enable you to extract specific values.
HTH,
Marc Schwartz