set.seed(12345)
data("colon")
## fit HTLR models with selected features, note that the chain length setting is for demo only
## using t prior with 1 df and log-scale fixed to -10
fit.t <- htlr(X = colon$X, y = colon$y, fsel = 1:100,
prior = htlr_prior("t", df = 1, logw = -10),
init = "bcbc", iter = 20, thin = 1)
## using NEG prior with 1 df and log-scale fixed to -10
fit.neg <- htlr(X = colon$X, y = colon$y, fsel = 1:100,
prior = htlr_prior("neg", df = 1, logw = -10),
init = "bcbc", iter = 20, thin = 1)
## using horseshoe prior with 1 df and auto-selected log-scale
fit.ghs <- htlr(X = colon$X, y = colon$y, fsel = 1:100,
prior = "ghs", df = 1, init = "bcbc",
iter = 20, thin = 1)
Run the code above in your browser using DataLab