[R] Getting the Bootstrap Error Rate of QDA
    Ko-Kang Kevin Wang 
    kwan022 at stat.auckland.ac.nz
       
    Thu May 22 07:03:42 CEST 2003
    
    
  
Hi,
What does this mean when I have something like:
>  qda.boot <- boot(train, qda.bootstrap, R = 500)
 Error in qda.default(structure(data.matrix(x), class = "matrix"), ...) : 
	Rank deficiency in group M
with my qda.bootstrap() looks something like:
> qda.bootstrap <- function(data, index) {
+   boot.qda <- qda(x = data[index, 2:9], group = data[index, 1])
+   qda.pred <- predict(boot.qda)
+   boot.resub <- sum(qda.pred$class != data[, 1]) / nrow(data)
+   data.pred <- predict(boot.qda, data[, 2:9])
+   data.resub <- sum(data.pred$class != data[,1]) / nrow(data)
+   abs(data.resub - boot.resub)
+ }
If I run qda.boot <- boot(train, qda.bootstrap, R = 500) a couple of 
times, it sometimes work but other times just give me the error message 
above.  Is there a way to solve this?
-- 
Cheers,
Kevin
------------------------------------------------------------------------------
/* Time is the greatest teacher, unfortunately it kills its students */
--
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