'R - Derivatives of the inverse of the regularized incomplete beta function w.r.t. shape parameters [closed]
The regularized incomplete beta function I(x,a,b) is the CDF for a random variable distributed Beta(a,b). I have a problem that requires computing the partial derivatives of its inverse (the quantile function) w.r.t. parameters a and b. Do you know how to do this? Thank you!
Solution 1:[1]
I don't know if there's a closed-form analytical expression, but you can do it numerically (numDeriv::grad()
uses Richardson extrapolation by default, see the documentation):
x <- 0.5
## dummy (lambda) function with x from above and specified shape parameters
f <- function(y) qbeta(x, y[1], y[2])
library(numDeriv)
grad(f,
## shape parameters at which to evaluate partial derivatives
x = c(1,1)
)
## [1] 0.3465736 -0.3465736
?
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|---|
Solution 1 |