Description Usage Arguments Value Author(s) References Examples
This function computes the marginal density of β and for β on an equidistant grid specified by the user. Currently only implemented for dim(β)=1,2.
1 2 |
D |
dimension of β. |
rangebeta |
a vector containing the start and ending point of β to be computed for. |
ngridbeta |
the number of grid values. |
a |
shape parameter of inverse gamma prior of ψ^2. |
b |
scale parameter of inverse gamma prior of ψ^2. |
r |
the scaling parameter r(δ=1) in the variance r(δ)ψ^2 of prior of τ^2. |
a0 |
shape parameter of beta prior of ω. |
b0 |
scale parameter of beta prior of ω. |
plot |
logical value (default is |
log |
logical value (default is |
the marginal density, the sequence of β and depending on specified plot
, log
arguments also the log-density and plot functions.
Nadja Klein
Nadja Klein, Thomas Kneib, Stefan Lang and Helga Wagner (2016). Spike and Slab Priors for Effect Selection in Distributional Regression. Working Paper.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 | set.seed(123)
#1-dimensional example
D = 1
ngridbeta = 1000
rangebeta = c(0.000001,1)
a0 = b0 = 0.5
a = 5
b = 50
r = 0.005
mdf <- mdbeta(D=1,rangebeta,ngridbeta,a=a,b=b,r=r,a0=a0,b0=b0)
#2-dimensional example
D = 2
ngridbeta = 100
rangebeta = c(0.000001,8)
a0 = b0 = 0.5
a = 5
b = 50
r = 0.005
mdf <- mdbeta(D=2,rangebeta,ngridbeta,a=a,b=b,r=r,a0=a0,b0=b0,plot=TRUE,log=TRUE)
mdf$logpl()
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.