Distribution and quantile functions from angular function
Distribution and quantile functions from angular function
Numerical computation of the distribution function F and the quantile function F−1 for an angular function
f in a tangent-normal decomposition . F−1(x) results from the inversion of [REMOVE_ME]F(x)=∫−1xωp−1cff(z)(1−z2)(p−3)/2dzF(x)=∫−1xωp−1cff(z)(1−z2)(p−3)/2dz[REMOVEME2]
for x∈[−1,1], where cf is a normalizing constant and ωp−1 is the surface area of Sp−2.
F_from_f(f, p, Gauss =TRUE, N =320, K =1000, tol =1e-06,...)F_inv_from_f(f, p, Gauss =TRUE, N =320, K =1000, tol =1e-06,...)
Arguments
f: angular function defined on [−1,1]. Must be vectorized.
p: integer giving the dimension of the ambient space Rp that contains Sp−1.
Gauss: use a Gauss-Legendre quadrature
rule to integrate f with N nodes? Otherwise, rely on integrate Defaults to TRUE.
N: number of points used in the Gauss--Legendre quadrature. Defaults to 320.
K: number of equispaced points on [−1,1] used for evaluating F−1 and then interpolating. Defaults to 1e3.
tol: tolerance passed to uniroot for the inversion of F. Also, passed to integrate's rel.tol and abs.tol if Gauss = FALSE. Defaults to 1e-6.
...: further parameters passed to f.
Returns
A splinefun object ready to evaluate F or F−1, as specified.
Description
Numerical computation of the distribution function F and the quantile function F−1 for an angular function
f in a tangent-normal decomposition . F−1(x) results from the inversion of