Skip to content

Getting the Bootstrap Error Rate of QDA

2 messages · Ko-Kang Kevin Wang, Brian Ripley

#
Hi,

What does this mean when I have something like:
Error in qda.default(structure(data.matrix(x), class = "matrix"), ...) : 
	Rank deficiency in group M
with my qda.bootstrap() looks something like:
+   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?
#
You need to investigate the validity of bootstrapping here.

Remember that to use QDA you need as any observations in each group as 
dimensions, and futhermore those observations need to like ones from a 
non-degenerate normal distribution.

Unless this is a balanced bootstrap you may end up with too few in each 
group, and even then the repeating of observations makes this nothing like 
the assumed distribution theory and you may well have enough observations 
but not enough distinct ones.
On Thu, 22 May 2003, Ko-Kang Kevin Wang wrote: