Description Usage Arguments Value Warning Author(s) References Examples
This function implements a optimisation routine that computes the scale parameter b and selection parameter
r. Here, we assume an inverse gamma prior IG(a,b) for τ^2 and β|δ,τ^2\sim N(0,r(δ)τ^2).
For given shape paramter a the user gets b, r
such that approximately P(β≤ c2|spike)≥ 1-α2 and P(β≥ c1|slab)≥ 1-α1 hold.
Note that if you observe numerical instabilities try not to specify α1 and α2 smaller than 0.1.
1 2 | hyperparlin(alpha1 = 0.1, alpha2 = 0.1, c1 = 0.1, c2 = 0.1,
eps = .Machine$double.eps, a = 5)
|
alpha1 |
denotes the 1-α1 level for b. |
alpha2 |
denotes the 1-α2 level for r. |
c1 |
denotes the expected range of the linear effect in the slab part. |
c2 |
denotes the expected range of the linear effect in the spike part. |
eps |
denotes the error tolerance of the result, default is |
a |
is the shape parameter of the inverse gamma distribution, default is 5. |
an object of class list
with root values r, b from uniroot
.
α1 and α2 should not be smaller than 0.1 due to numerical sensitivity and possible instability. Better change c1, c2.
Nadja Klein
Nadja Klein, Thomas Kneib, Stefan Lang and Helga Wagner (2016). Automatic Effect Selection in Distributional Regression via Spike and Slab Priors. Working Paper.
1 2 3 4 5 6 | set.seed(123)
result <- hyperparlin()
r <- result$r
b <- result$b
hyperparlin(alpha1=0.1,alpha2=0.1,c1=0.5,c2=0.1,a=5)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.