Generalized Additive Models (GAM) are non-parametric models that add smoother to the data. In this exercise, we will look at GAMs using cubic spline using the mgcv package. Data-sets used can be downloaded here. The data-set is the experiment result of grassland richness over time in the Yellowstone National Park (Skkink et al. 2007). […]

# GAM

## Basic Generalized Additive Models In Ecology: Solutions

Below are the solutions to these exercises on “GAMs – Exercises.” if (!require(mgcv)){install.packages(mgcv, dep=T)} library(mgcv) if (!require(car)){install.packages(car, dep=T)} library(car) ############### # # # Exercise 1 # # # ############### Veg <- read.csv(file.choose()) str(Veg) ## ‘data.frame’: 58 obs. of 8 variables: ## $ SR : int 8 6 8 8 10 7 6 5 8 6 […]