Description Usage Arguments Value References Examples
IMPORTANT NOTICE: Center and scale your predictors before using this function.
Each group receives its own inclusion prior "phi" through a uniform beta(1, 1) prior. The marginal
posterior means give the Bayesian Model Averaged estimates, which are the expected values of each parameter averaged over
all possible (or all sampled) models (Hoeting et al., 1999).
Model Specification:
1 2 3 4 | groupSpike(X, y, idx, family = "gaussian", phi_prior = c(1, 4),
log_lik = FALSE, iter = 10000, warmup = 1000, adapt = 2000,
chains = 4, thin = 1, method = "parallel", cl = makeCluster(2),
...)
|
X |
the model matrix. Construct this manually with model.matrix()[,-1] |
y |
the outcome variable |
idx |
the group labels. Should be of length = to ncol(model.matrix()[,-1]) with the group assignments for each covariate. Please ensure that you start numbering with 1, and not 0. |
family |
one of "gaussian", "binomial", or "poisson". |
log_lik |
Should the log likelihood be monitored? The default is FALSE. |
iter |
How many post-warmup samples? Defaults to 10000. |
warmup |
How many warmup samples? Defaults to 1000. |
adapt |
How many adaptation steps? Defaults to 2000. |
chains |
How many chains? Defaults to 4. |
thin |
Thinning interval. Defaults to 1. |
method |
Defaults to "parallel". For an alternative parallel option, choose "rjparallel". Otherwise, "rjags" (single core run). |
cl |
Use parallel::makeCluster(# clusters) to specify clusters for the parallel methods. Defaults to two cores. |
... |
Other arguments to run.jags. |
A run.jags object
Kuo, L., & Mallick, B. (1998). Variable Selection for Regression Models. Sankhyā: The Indian Journal of Statistics, Series B, 60(1), 65-81.
Yuan, Ming; Lin, Yi (2006). Model Selection and Estimation in Regression with Grouped Variables. Journal of the Royal Statistical Society. Series B (statistical Methodology). Wiley. 68 (1): 49–67. doi:10.1111/j.1467-9868.2005.00532.x
Hoeting, J. , Madigan, D., Raftery, A. & Volinsky, C. (1999). Bayesian model averaging: a tutorial. Statistical Science 14 382–417.
1 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.