I wan't to draw 95% prediction area of an LDA model.

I can draw the prediciton area, however with no information on the confidence.

# train model ----
mdl1 <- MASS::lda(y~ x1+ x2,data=traindata)

# partition matrix
klaR::partimat(y~  x1+ x2, data=traindata, method="lda",prec=250,
               na.correct=NA, col.wrong=NA,
               main="Main title")

I would like to get something like in this article: https://www.sciencedirect.com/science/article/pii/S0048969712016191


1 Answer 1


One option to calculate confident interval is to use bootstrap : repeat your model several times (exemple 100 times) on a random subsample of your dataset (randomly select 90% of your dataset each time).

Instead of having one result, you will have 100 results (similar results, but with a slight difference) and you can use these results to build your confident interval (order your results and take quantile 5% and 95%)

  • $\begingroup$ Quite trivial, still didn't think upon it. Thanks! $\endgroup$ May 23, 2019 at 7:59

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.