[R] errorest
Kuhn, Max
Max.Kuhn at pfizer.com
Thu Jun 23 17:17:58 CEST 2005
Jenny,
"It didn't work" and "They worked" aren't very specific. Also, the package
name is ipred and the function is errorest.
The estimator entry on the man page for errorest has:
'cv' cross-validation, 'boot' bootstrap or '632plus' bias corrected
bootstrap (classification only).
Note the *or*. I tried the analysis of the iris data from the man page with
your estimator specification:
> testing <- errorest(Species ~ ., data=iris, model=lda,
+ estimator = c("boot","632plus"), predict= mypredict.lda)
> testing
Call:
errorest.data.frame(formula = Species ~ ., data = iris, model = lda,
predict = mypredict.lda, estimator = c("boot", "632plus"))
Bootstrap estimator of misclassification error
with 25 bootstrap replications
Misclassification error: 0.0235
Standard deviation: 0.0028
Call:
errorest.data.frame(formula = Species ~ ., data = iris, model = lda,
predict = mypredict.lda, estimator = c("boot", "632plus"))
.632+ Bootstrap estimator of misclassification error
with 25 bootstrap replications
Misclassification error: 0.0222
>
> unclass(testing)
$boot
$boot$error
[1] 0.02351852
$boot$sd
[1] 0.002847447
$boot$bc632plus
[1] FALSE
$boot$nboot
[1] 25
$"632plus"
$"632plus"$error
[1] 0.02222817
$"632plus"$nboot
[1] 25
$"632plus"$bc632plus
[1] TRUE
$call
errorest.data.frame(formula = Species ~ ., data = iris, model = lda,
predict = mypredict.lda, estimator = c("boot", "632plus"))
Is this consistent with your results?
Max
LEGAL NOTICE\ Unless expressly stated otherwise, this messag...{{dropped}}
More information about the R-help
mailing list