GibbsSampler | R Documentation |
The Metropolized restricted Gibbs sampler
GibbsSampler(
y,
x,
n.vars = ncol(x),
perm = TRUE,
n.models = 10,
tau = 0.9,
len = 1000,
k = 1,
gamma = 0.5,
info = c("AIC", "BIC", "AICc", "exBIC"),
family = c("gaussian", "poisson", "binomial")
)
y |
the response variable |
x |
the predictors |
n.vars |
the number of maximal predictors included in the candidate model |
perm |
the permutation of Gibbs sampler, default TRUE |
n.models |
the number of top selected models |
tau |
the threshold to select the important predictors in second step, default is 0.9 |
len |
the half number of generated samples, default is 1000 |
k |
the tuning parameter, default is 1 |
gamma |
the parameter for extended BIC, default is 0.5 |
info |
the selected model selection criterion from AIC, AICc, BIC and exBIC |
family |
the type of model from linear, logistic, poisson |
a list of summary
x <- matrix(rnorm(1000), ncol = 10);
y <- rowSums(x[,1:5]) + rnorm(100)
m.s <- GibbsSampler(y,x,info = "BIC", family = "gaussian")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.