1. Phormidium cover

1.2 Data exploration

First check the histograms of the transformed predictor variables and pair plots for co-linearity among predictors.

Density plots of original and transformed preditors

Density plots of original and transformed preditors

Pairs plot of transformed predictor variables

Pairs plot of transformed predictor variables

Phormidium cover through time

Phormidium cover through time

Relationship between Phormidium and predictors by river

Explore the relationship of Phormidium cover with all predictor variables by river.

PCA of environmental variables on each river

PCA of environmental variables on each river

Boxplot of environmental variables per river

Boxplot of environmental variables per river

1.3 GAM model

Fit a GAM model using cubic spline for each predictor variable and using Gaussian (normal) errors with a log link. The model also has an auto-correlation structure of order 1.

The formula for the model is:

## cyanocover + 0.01 ~ cs(week) + cs(sqDIN) + cs(logDRP) + cs(spotTemp) + 
##     cs(logFlow) + cs(Cond) + cs(logSilt) + SiteName
Results of the GAMM for Phormidium percentage cover using a log normal error distributions
Estimate Std. Error t value Pr(>|t|)
(Intercept) -4.68 1.09 -4.29 0.00002
cs(week) -0.04 0.01 -7.14 0.00000
cs(sqDIN) 2.20 0.50 4.38 0.00001
cs(logDRP) -0.31 0.17 -1.85 0.06537
cs(spotTemp) 0.10 0.03 3.84 0.00014
cs(logFlow) -0.44 0.09 -4.83 0.00000
cs(Cond) 0.01 0.00 3.27 0.00115
cs(logSilt) 0.25 0.05 4.84 0.00000
Partial effects GAM plots of the effect  predictor variables on Phormidium cover. The solid line is a cubic spline fitted (+/- S.E.) and the points a re the model residuals.

Partial effects GAM plots of the effect predictor variables on Phormidium cover. The solid line is a cubic spline fitted (+/- S.E.) and the points a re the model residuals.

## This is mgcv 1.8-11. For overview type 'help("mgcv-package")'.
Two-way interaction surface plots

Two-way interaction surface plots

Standarised residuals for the fitted GAM model using log normal errors

Standarised residuals for the fitted GAM model using log normal errors

R-squared for the model

## [1] 0.5617614

1.3 Boosted regression tree model

## Loading required package: survival
## Loading required package: lattice
## Loaded gbm 2.1.1

##               var   rel.inf
## SiteName SiteName 26.239420
## logFlow   logFlow 16.168612
## sqDIN       sqDIN 15.669461
## Cond         Cond 10.126061
## spotTemp spotTemp  8.970681
## logDRP     logDRP  7.985903
## logSilt   logSilt  7.697782
## week         week  7.142080
Partial plots boosted tree

Partial plots boosted tree

2-way plots
2-way plots

2-way plots

2-way plots

2-way plots

3-way plots
2-way plots

2-way plots

2-way plots

2-way plots