apcSpike: Adaptive Powered Correlation Prior Stochastic Search Variable...

Description Usage Arguments Value References Examples

View source: R/apcSpike.R

Description

IMPORTANT: I suggest not using any factor predictor variables, only numeric. In my experience the inclusion of categorical predictors tends to lead to odd results in calculating the prior scale.

The adaptive powered correlation prior extends the Zellner-Siow Cauchy g-prior by allowing the crossproduct of the model matrix to be raised to powers other than -1 (which gives the Fisher information matrix). The power here will be referred to as "lambda". A lambda of 0 results in an identity matrix, which results in a ridge-regression like prior. Positive values of lambda adapt to collinearity by allowing correlated predictors to enter and exit the model together. Negative values of lambda on the other hand favor including only one of a set of correlated predictors. This can be understood as projecting the information matrix into a new space which leads to a model similar in function to principal components regression (Krishna et al., 2009). In this implementation full Bayesian inference is used for lambda, rather than searching via marginal likelihood maximization as Krishna et al. (2009) did. The reason for this is twofold. First, full Bayesian inference means the model has to be fit only once instead of several times over a grid of candidate values for lambda. Second, this avoids any coherency problems such as those that arise when using fixed-g priors.

The probability that a variable has no effect is 1 - mean(delta_i), where delta_i is an indicator variable that takes on values of 1 for inclusion and 0 for exclusion. Averaging the number of 1s over the MCMC iterations gives the posterior inclusion probability (pip), hence, 1-pip gives the posterior exclusion probability. The overall rate of inclusion for all variables is controlled by the hyperparameter "phi". Phi is given a beta(1,1) prior which gives uniform probability to the inclusion rate.

The posterior means of the coefficients give the Bayesian Model Averaged estimates, which are the expected values of each parameter averaged over all sampled models (Hoeting et al., 1999).

The model specification is given below. Note that the model formulae have been adjusted to reflect the fact that JAGS parameterizes the normal and multivariate normal distributions by their precision, rater than (co)variance. For generalized linear models plug-in pseudovariances are used. Model Specification:



Plugin Pseudo-Variances:

Usage

1
2
3
4
apcSpike(formula, data, family = "gaussian", lower = NULL,
  upper = NULL, log_lik = FALSE, iter = 15000, warmup = 5000,
  adapt = 5000, chains = 4, thin = 1, method = "rjparallel",
  cl = makeCluster(2), ...)

Arguments

formula

the model formula

data

a data frame

family

one of "gaussian", "st" (Student-t with nu = 3), "binomial", or "poisson".

lower

lower limit on value of lambda. Is NULL by default and limits are set based on the minimum value that produces a positive definite covariance matrix.

log_lik

Should the log likelihood be monitored? The default is FALSE.

iter

How many post-warmup samples? Defaults to 15000.

warmup

How many warmup samples? Defaults to 5000.

adapt

How many adaptation steps? Defaults to 5000.

chains

How many chains? Defaults to 4.

thin

Thinning interval. Defaults to 1.

method

Defaults to "rjparallel". For an alternative parallel option, choose "parallel". 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.

uppper

upper limit on value of lambda. Is NULL by default and limits are set based on the maximum value that produces a positive definite covariance matrix.

Value

A run.jags object.

References

Krishna, A., Bondell, H. D., & Ghosh, S. K. (2009). Bayesian variable selection using an adaptive powered correlation prior. Journal of statistical planning and inference, 139(8), 2665-“2674. doi:10.1016/j.jspi.2008.12.004

Kuo, L., & Mallick, B. (1998). Variable Selection for Regression Models. Sankhyā: The Indian Journal of Statistics, Series B, 60(1), 65-81.

Hoeting, J. , Madigan, D., Raftery, A. & Volinsky, C. (1999). Bayesian model averaging: a tutorial. Statistical Science 14 382–417.

Examples

1

abnormally-distributed/Bayezilla documentation built on Oct. 31, 2019, 1:57 a.m.