2

I'd like to perform an estimation of a probability (bounded [0, 1]) that has several input variables and success/failure results with those values. Some of these input variables have a monotone relationship with the probability, which I would like to use as a restriction.

I found the package isotone which has the routine mregnnP, which appears to at least satisfy the monotonicity + non-negativity. However, I don't see any means to enforce the upper bound (p <= 1). Furthermore, since my training data for this probability is based on events in the form of {0, 1} (success or failure), I don't see any transformation (e.g. logarithm) to guarantee the upper/lower bound while preserving my data.

I could implement the optimization by hand, but I was hoping there might be some pre-built package that would be faster to run and require less time investment.

kjetil b halvorsen
  • 63,378
  • 26
  • 142
  • 467
ecksc
  • 93
  • 5

1 Answers1

2

After some digging, I realized that this is an example of a Generalized Additive Model with a binomial link function. The scam package allows for shape constraints such as monotonicity attached to that:

https://cran.r-project.org/web/packages/scam/scam.pdf

ecksc
  • 93
  • 5