[R] Bootstraping with MANOVA
Ko-Kang Kevin Wang
kwan022 at stat.auckland.ac.nz
Tue Jun 10 22:17:57 CEST 2003
Hi,
Does anyone know what the error message mean?
> Boot2.Pillai <- function(x, ind) {
+ x <- as.matrix(x[,2:ncol(x)])
+ boot.x <- as.factor(x[ind, 1])
+ boot.man <- manova(x ~ boot.x)
+ summary(manova(boot.man))[[4]][[3]]
+ }
>
> man.res <- manova(as.matrix(pl.nosite) ~
+ as.factor(plankton.new[,1]))$residuals
> boot2.plank <- cbind(plankton.new[, 1], man.res)
> boot.sep <- boot(boot2.plank, Boot2.Pillai, R = 1000,
+ strata = plankton.new[, 1])
Error in summary.manova(manova(boot.man)) :
residuals have rank 5 < 6
Execution halted
A sample of plankton.new is as follows:
> plankton.new[sample(dim(plankton.new)[1], 5, replace = TRUE),]
site ACARTIA EUTERP GLADIO TEMORA FAVELLA OIKOPL
15 M 2.326336 3.168792 0.000000 0.000000 3.854852 0
47 W 2.699838 2.276462 1.799341 2.495544 2.274158 0
33 W 2.274158 3.301247 0.000000 0.000000 0.000000 0
8 M 2.875640 2.796574 0.000000 0.000000 3.051538 0
4 M 2.100371 2.796574 0.000000 0.000000 2.100371 0
pl.nosite is a data frame like plankton.new, but without the site column.
--
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)
More information about the R-help
mailing list