0

I am new to this forum so I hope I am describing my problem in an understandable way. Many thanks in advance for looking at it.

In R studio, I am using a function called miperform_lr (part of psfmi-package) to validate a model. However when I try to run the miperform_lr function, it gives the following error:

"Error in cut.default(pred.i[[i]], quantile(pred.i[[i]], c(seq(0,1,0.1)))): 'breaks' are not unique"

Unfortunately, I cannot go into the miperform_lr function, but here is the general syntax:

"miperform_lr(data, nimp=5, impvar=NULL, Outcome, predictors=NULL, cat.predictors=NULL, int.predictors=NULL, cal.plot=FALSE, plot.indiv=FALSE, int.val=FALSE, method="boot", B=250, bw=FALSE, rule="p", type="individual", p.val=0.05, force=NULL)

I already checked which of the inputs gives the problem, this is input "predictors". For predictors, I am using 4 variables with the following characteristics:

- Variable A: dichotomous variable, 0 or 1
- Variable B: dichotomous variable, 0 or 1
- Variable C: dichotomous variable, 1 or 2
- Variable D: dichotomous variable, 1 or 2

Does anyone know why I get the above mentioned error?

NelsonGon
  • 13,015
  • 7
  • 27
  • 57
  • 1
    Please edit according to [this](https://stackoverflow.com/questions/5963269/how-to-make-a-great-r-reproducible-example) for better reproducibility. – NelsonGon Dec 22 '19 at 15:10

1 Answers1

0

Probably your range of predicted probabilities is to narrow. You can download the new development version of the miperform_lr function from github now, there you can also choose for 5 groups by using groups_cal =5. Perhaps that works for you. See (https://github.com/mwheymans/psfmi).