bms {maclogp} | R Documentation |
Bayesian Model Confidence Set
Description
This function allows you to obtain a bayesian model confidence set with approximate posterior model probability.
Usage
bms(data, alpha, eps = 1e-06)
Arguments
data |
a list including
|
alpha |
a vector of significance levels. The confidence levels are 1- |
eps |
toterance level in choosing models with total posteriors
at least |
Value
Returns a list containing:
models |
A list with one entry for each model. Each entry is an integer
vector that specifies the columns of matrix |
con_sets |
a list with with one entry for a |
length_con |
lengths of confidence sets. |
probs_inorder |
Model posteriors in decreasing order. |
beta_ls |
a list with one entry for each model. Each entry is a vector of estimated coefficients for that model. |
References
Liu, X., Li, Y. & Jiang, J.(2020). Simple measures of uncertainty for model selection. TEST, 1-20.
Raftery, Adrian E. (1995). Bayesian model selection in social research (with Discussion). Sociological Methodology 1995 (Peter V. Marsden, ed.), pp. 111-196.
See Also
Examples
n= 50
B= 100
p= 5
x = matrix(rnorm(n*p, mean=0, sd=1), n, p)
true_b = c(1:3, rep(0,p-3))
y = x%*% true_b+rnorm(n)
alpha=c(0.1,0.05,0.01)
data=list(x=x,y=y)
result=bms(data,alpha)