ABSTRACT

Variable selection can be naturally seen as a model selection problem where the entertained models differ in which subset of variables explains the outcome of interest. Posterior model probabilities are a simple function of Bayes factors, a key inferential tool in Bayesian analysis. This approach to variable selection automatically provides sparse answers along with probabilistic assessments regarding their credibility. This methodology is, however, not exempt from difficulties including prior elicitation and numerical challenges related with its practical implementation. Particularly in the context of linear and generalized linear models, the so-called g-priors are often used due to their appealing properties formally described in Bayarri et al. (2012). In this chapter we review the implementation of variable selection through Bayes factors in linear and generalized linear models, using g-priors. Emphasis is placed on providing: i) practical guides for implementation, including documentation for the use of R packages and ii) the analysis of real examples which illustrate the enormous potential of this approach to variable selection.