  Factors are categorical variables, and the values which these variables
assume are called levels. In this paper, we consider the variable selection
problem where the set of potential predictors contains both factors and
numerical variables. Formally, this problem is a particular case of the
standard variable selection problem where factors are coded using dummy
variables. As such, the Bayesian solution would be straightforward and,
possibly because of this, the problem, despite its importance, has not received
much attention in the literature. Nevertheless, we show that this perception is
illusory and that in fact several inputs like the assignment of prior
probabilities over the model space or the parameterization adopted for factors
may have a large (and difficult to anticipate) impact on the results. We
provide a solution to these issues that extends the proposals in the standard
variable selection problem and does not depend on how the factors are coded
using dummy variables. Our approach is illustrated with a real example
concerning a childhood obesity study in Spain.
