Summary
This repository is a documentation repository that accompanies the FSSgam software paper: Fisher R, Wilson SK, Sin TM, Lee AC, Langlois TJ. A simple function for full-subsets multiple regression in ecology with R, published in the journal Ecology and Evolution in 2018 (2018;8:6104–6113).
Here we provide documentation, FAQs, R code to run the case studies outlined in the original publication, as well as some additional examples of usage.
Project website & documentation:
https://beckyfisher.github.io/FSSgam
R package source code:
https://github.com/beckyfisher/FSSgam_package
Installation
The FSSgam package depends on a number of standard R packages for generalised additive modelling and model selection.
All examples on this site are built and tested using current versions of R and the package dependencies via continuous integration.
To install the latest version from github use:
if (!requireNamespace("remotes", quietly = TRUE)) {
install.packages("remotes")
}
remotes::install_github("beckyfisher/FSSgam_package")Citation
If you use FSSgam or results derived from it, please cite:
Fisher R, Wilson SK, Sin TM, Lee AC, Langlois TJ (2018).
A simple function for full-subsets multiple regression in ecology with R.
Ecology and Evolution, 8(12), 6104–6113.
https://doi.org/10.1002/ece3.4134
Bug reports
If you find a bug, have a question, or would like to suggest an improvement,
please report it via the GitHub issue tracker.
Background
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.
This repository contains a set of functions 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. The function is based on Generalized Additive Models (GAM) and builds on the MuMIn package.
These functions have since been moved to an R package FSSgam, that can be easily installed from github (see below, [https://github.com/beckyfisher/FSSgam_package]).
Advantages include the capacity to fit more predictors than there are replicates, automatic removal of models with correlated predictors, and model sets that include interactions between factors and smooth predictors, as well as smooth interactions with other smooths (via t2).
The function(s) take 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 package 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.
known issues
This package assumes you know what you are doing. Non-gaussian mixed model gamm resorts to PQL meaning that AICc calls will not return the AIC of the actual model. Please thoroughly read the help files contained within the gamm4 and mgcv packages, including information under details.
GAMM is highly sensitive to the spread of your predictors, so please check those carefully ensuring a robust range of values and that there are no gaps.
License
The code is released under the Apache License 2.0
Copyright 2020 Australian Institute of Marine Science
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.