View source: R/distributionFuns.R
bounding_const_M | R Documentation |
bounding_const_M
calculates the bounding constant M
used in the acceptance-rejection sampling algorithm
for the univariate skewed t-distribution described in Hansen (1994)
bounding_const_M(nu, lambda)
nu |
the degrees of freedom parameter value, a numeric scalar strictly larger than two. |
lambda |
the skewness parameter value, a numeric scalar strictly between -1 and 1. |
The function computes the bounding constant M
required for the acceptance-rejection sampling method by evaluating
the ratio of the skewed t-density (skewed_t_dens
) to the standard t-density (stand_t_dens
)
over a grid of y
values ranging from -10
to 10
. To improve the efficiency of the sampling algorithm, the degrees
of freedom parameter for the proposal distribution is set to the minimum of nu
and 3
, ensuring heavier tails in the
proposal distribution when nu
is large. A safety margin of 10% is added to the maximum ratio to account for numerical
inaccuracies and ensure that the inequality f(y) \leq M \cdot q(y)
holds over the entire support.
Returns a numeric scalar representing the estimated bounding constant M
to be used in the acceptance-rejection
sampling algorithm.
Hansen B.E. 1994. Autoregressive Conditional Density estimation. Journal of Econometrics, 35:3, 705-730.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.