GibbsSampler: The Metropolized restricted Gibbs sampler

View source: R/gibbs.R

GibbsSamplerR Documentation

The Metropolized restricted Gibbs sampler

Description

The Metropolized restricted Gibbs sampler

Usage

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")
)

Arguments

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

Value

a list of summary

Examples

x <- matrix(rnorm(1000), ncol = 10);
y <- rowSums(x[,1:5]) + rnorm(100)
m.s <- GibbsSampler(y,x,info = "BIC", family = "gaussian")


Kaukol/IBGS documentation built on June 17, 2024, 2:37 p.m.