R-help, I'm trying to evaluate the misclasification rate of an estimated discrimated function (hyDA)
hyDA <- with(hyB, lda(Maturity ~ Length + Weight)) , so here is what I do (code from S-plus 6.1 Guide to Statistics Vol. 2 p 101) test <- predict(hyDA) tbl <- table(hyB$Maturity, test$class) tbl <- tbl[-2,-2] tbl1 <- cbind(tbl, error = (apply(tbl, 1, sum) - diag(tbl)) / hyDA$counts) sum(hyDA$prior * tbl1[,'error']) The error rates I get is 0.57 which is very large I was wondering if I'm doing something wrong. Thanks in advance. > version _ platform i386-pc-mingw32 arch i386 os mingw32 system i386, mingw32 status major 2 minor 4.0 year 2006 month 10 day 03 svn rev 39566 language R version.string R version 2.4.0 (2006-10-03) > ______________________________________________ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.