inc.beta.deriv {curesurv}R Documentation

inc_beta_deriv function

Description

computes the first and second derivatives of incomplete Beta function with respect of Beta parameters p and or q using algorithm differentiating the aproximants of I_{x,p,q} formula in terms of forward recurrence relations where the the n^{th} approximant can be expressed as :

I_{x,p,q} \approx K_{x,p,q} A_n/B_n

, n \geq 1

This technique was proposed by Moore (1982) to calculate the derivatives of incomplete gamma function.

Usage

inc.beta.deriv(
  x,
  p = stop("p must be specified"),
  q = stop("q must be specified"),
  err = .Machine$double.eps * 10000,
  minapp = 2,
  maxapp = 1000
)

Arguments

x

vector of length k containing values to which the beta function is to be integrated

p

Beta shape1 parameter

q

Beta shape2 parameter. shape1 and shape2 can be vertors in the same dimension as x or scalars

err

value for error

minapp

minimal bound value

maxapp

external noud value

Value

An object of class FD.inc.beta. This object is a list containing 15 components. The first 13 components in the list are each a vector of the same length as x (u in the model). The two last elements are scalar terms. The output elements are:

I

I_{x,p,q}. This equal to the output of pbeta(x,shape1,shape2)

Ip

I_{x,p,q}^{p} denotes the first derivative of the incomplete beta function with respect to p

Ipp

I_{x,p,q}^{pp} denotes the second derivative of the incomplete beta function with respect to p

Iq

I_{x,p,q}^{q} denotes the first derivative of the incomplete beta function with respect to q

Iqq

I_{x,p,q}^{qq} denotes the second derivative of the incomplete beta function with respect to q

Ipq

I_{x,p,q}^{pq} denotes the first derivative of the incomplete beta function with respect to p and q

log.Beta

\log[\mathrm{Beta}(p,q)]

digamma.p

\psi_p

trigamma.p

\psi_p'

digamma.q

\psi_q

trigamma.q

\psi_q'

digamma.pq

\psi_{p+q}

trigamma.pq

\psi_{p+q}'

nappx

highest order approximant evaluated. Iteration stops if nappx>maxappx

errapx

approximate maximum absolute error of computed derivatives

References

Boik, Robert J., and James F. Robison-Cox. "Derivatives of the incomplete beta function." Journal of Statistical Software 3.1 (1998): 1-20. (arXiv)


[Package curesurv version 0.1.1 Index]