hyperparlin: Find Scale Parameter for Inverse Gamma Hyperprior of Linear Effects with Spike and Slab Prior
Description
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 \(\tau^2\) and \(\beta|\delta,\tau^2\sim N(0,r(\delta)\tau^2)\).
For given shape paramter \(a\) the user gets \(b\), \(r\)
such that approximately \(P(\beta\le c2|spike)\ge 1-\alpha2\) and \(P(\beta\ge c1|slab)\ge 1-\alpha1\) hold.
Note that if you observe numerical instabilities try not to specify \(\alpha1\) and \(\alpha2\) smaller than 0.1.
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 .Machine$double.eps.
a
is the shape parameter of the inverse gamma distribution, default is 5.
Value
an object of class list with root values \(r\), \(b\) from uniroot.
Warning
\(\alpha1\) and \(\alpha2\) should not be smaller than 0.1 due to numerical sensitivity and possible instability. Better change \(c1\), \(c2\).
References
Nadja Klein, Thomas Kneib, Stefan Lang and Helga Wagner (2016). Automatic Effect Selection in Distributional Regression via Spike and Slab Priors.
Working Paper.