Abstract:
|
Linear models with categorical predictors are widely used by practitioners in a variety of scientific fields. However, recent work has shown that the levels of the categorical predictor in such models often fall into two latent groups that may influence the regression effects and/or error variance in ways that are unaccounted for with typical analyses. Specifically, we implement Bayesian model selection methodology which utilizes fractional Bayes factor and mixture g-priors, through the new R package “slgf”. Our package allows the user to specify a set of candidate models, a choice of prior on regression effects, and the specific manner in which the latent group-based structure may manifest within the data. We illustrate our method and the usage of slgf in the class of linear models, including one-way ANOVA, ANCOVA, and unreplicated two-way layouts using real data sets, although our R package is broadly applicable to the class of linear models that include categorical predictors.
|