Learn R Programming

sstvars (version 1.1.0)

bounding_const_M: Compute the bounding constant for acceptance-rejection sampling

Description

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)

Usage

bounding_const_M(nu, lambda)

Value

Returns a numeric scalar representing the estimated bounding constant \(M\) to be used in the acceptance-rejection sampling algorithm.

Arguments

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.

Details

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.

References

  • Hansen B.E. 1994. Autoregressive Conditional Density estimation. Journal of Econometrics, 35:3, 705-730.