A simple function for full‐subsets multiple regression in ecology with R. Issue 12 (20th May 2018) - Fisher, Rebecca; Wilson, Shaun K.; Sin, Tsai M.; Lee, Ai C.; Langlois, Tim J.
Abstract: Full‐subsets information theoretic approaches are becoming an increasingly popular tool for exploring predictive power and variable importance where a wide range of candidate predictors are being considered. Here, we describe a simple function in the statistical programming language R that can be used to construct, fit, and compare a complete model set of possible ecological or environmental predictors, given a response variable of interest and a starting generalized additive (mixed) model fit. Main advantages include not requiring a complete model to be fit as the starting point for candidate model set construction (meaning that a greater number of predictors can potentially be explored than might be available through functions such as dredge); model sets that include interactions between factors and continuous nonlinear predictors; and automatic removal of models with correlated predictors (based on a user defined criterion for exclusion). The function takes continuous predictors, which are fitted using smoothers via either gam, gamm (mgcv) or gamm4, as well as factor variables which are included on their own or as two‐level interaction terms within the gam smooth (via use of the "by" argument), or with themselves. The function allows any model to be constructed and used as a null model, and takes a range of arguments that allow control over the model set being constructed, including specifying cyclic and linear continuous predictors, specification of the smoothing algorithm used, and the maximum complexity allowed for smooth terms. The use of the function is demonstrated via case studies that highlight how appropriate model sets can be easily constructed and the broader utility of the approach for exploratory ecology. Abstract : This study describes a function developed in R that can be used by ecologists to analyze their data using a full‐subsets information theoretic approach. Main advances beyond existing packages include not requiring a complete model as the starting point for candidate models set construction allowing a greater number of predictors to be explored; model sets that include interactions between factors and continuous nonlinear predictors; and automatic removal of models with correlated predictors.