View source: R/prior_calibration.R
| calibrate_inv_exp_lambda_driven_nig | R Documentation |
Calibrate \lambda in the prior
\kappa = 1/\nu \sim \mathrm{Exp}(\lambda)
using a tail-inflation target for driven NIG noise.
The calibration target is
\Pr(R_c(\nu) > r_\text{target}) = \alpha,
where
R_c(\nu) = \frac{\Pr(|U| > c \mid \nu)}{\Pr(|Z| > c)},\quad Z\sim N(0,1)
and
U = \frac{\mu(V-h) + \sigma\sqrt{V}Z}{\sigma\sqrt{h}},\quad V\sim\mathrm{GIG}(-1/2,\nu,\nu h^2).
The function solves R_c(\nu_r) = r_\text{target} using log-scale
bisection, then returns
\lambda = -\nu_r \log(\alpha).
calibrate_inv_exp_lambda_driven_nig(
r_target = 2,
alpha = 0.1,
c = 3,
mu = 0,
sigma = 1,
h = 1,
n_samples = 1e+05,
nu_lower = 0.1,
nu_upper = 100,
tol = 0.05,
max_iter = 30,
max_expand = 30,
seed = NULL
)
calibrate_inv_exp_lambda(...)
r_target |
target tail inflation level |
alpha |
target prior probability in |
c |
tail threshold for |
mu |
NIG drift parameter in the driven noise term |
sigma |
NIG scale parameter (> 0) |
h |
positive increment scaling (> 0) |
n_samples |
Monte Carlo sample size used per evaluation of |
nu_lower |
initial lower bracket for |
nu_upper |
initial upper bracket for |
tol |
relative tolerance for solving |
max_iter |
maximum number of bisection iterations |
max_expand |
maximum bracket expansion steps on each side |
seed |
optional integer seed for reproducible calibration |
... |
arguments forwarded to |
A list with calibrated 'lambda', solved 'nu_r', achieved 'rc_nu_r', and diagnostics.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.