rapx_cf: Approximate random generation via Cornish-Fisher expansion.
Description
Approximate random generation via approximate quantile function.
Usage
rapx_cf(n, raw.cumulants, support=c(-Inf,Inf))
Arguments
n
number of observations. If 'length(n) > 1', the length is
taken to be the number required.
raw.cumulants
an atomic array of the 1st through kth raw cumulants. The first
value is the mean of the distribution, the second should
be the variance of the distribution, the remainder are raw cumulants.
support
the support of the density function. It is assumed
that the density is zero on the complement of this open interval.
Value
A vector of approximate draws.
Details
Given the cumulants of a probability distribution, we approximate the
quantile function via a Cornish-Fisher expansion.