dt.int2: INTerpolation of INTeger degrees of freedom noncentral...

Description Usage Arguments Details Value Author(s) See Also

View source: R/int.nct.R

Description

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.

Usage

1
dt.int2(x, df, ncp, log = FALSE, ndiv = 8)

Arguments

x

A numeric vector of quantiles

df

A numeric vector degrees of freedom

ncp

A numeric vector of noncentrality parameters

log

logical; if TRUE, log densities are returned.

ndiv

numeric; the number of points used for polynomial interpolation

Details

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.

Value

A numeric vector of densities.

Author(s)

Long Qu

See Also

dtn.mix, dt, dt.lap, dt.sad, mTruncNorm


pi0 documentation built on July 9, 2017, 9:01 a.m.