This funciton evaluates the noncentral t-density using an iterative procedure for integer degrees of freedom. This is much faster than two calls to the pt approach.
For non-integer degrees of freedom, the polynomial interpolation is used to approximate the density.
dt.int2(x, df, ncp, log = FALSE, ndiv = 8)A numeric vector of quantiles
A numeric vector degrees of freedom
A numeric vector of noncentrality parameters
logical; if TRUE, log densities are returned.
numeric; the number of points used for polynomial interpolation
A numeric vector of densities.
This function uses the iterative relation for the integral in the noncentral t-density. It starts with df=0 and df=1,
and then iteratively computes the integral for larger df. For non-integer df, it uses ndiv nearest points to perform a
divided difference polynomial interpolation approximation. For integer df, this function is about 2 to 3 times faster than dt function and is exact.
dtn.mix, dt, dt.lap, dt.sad, mTruncNorm