1
$\begingroup$

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)
summary(mdl1)

# partition matrix
klaR::partimat(y~  x1+ x2, data=traindata, method="lda",prec=250,
               image.colors=c("pink","lightgreen","lightblue"),
               na.correct=NA, col.wrong=NA,
               gs=NA,
               col.mean=NA,
               main="Main title")

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

$\endgroup$

1 Answer 1

0
$\begingroup$

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%)

$\endgroup$
1
  • $\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.