- A scientific research by Jeremie Boudreault, Fateh Chebana, AndrΓ© St-Hilaire and Normand Bergeron
- This project was part of my master degree in water sciences at Institut National de la Recherche Scientifique.
- All codes and data are made available here under the Creative Common License
.
- The research article was published in Journal of Ecohydraulics on 09/02/2021.
- Questions regarding the code or the data should be sent to [email protected].
Data are from field survey that have been conducted during summer 2017 on the Sainte-Marguerite river (SMR) :
data/field/*
: contains the raw .xlsx file filled after each day of field workdata/*
: contains the cleaned and transformed datasets
Scripts are all from Jeremie Boudreault. They use the R package mgcv
to fit generalized additive models (GAM) and of FDboost
to fit functional regression models (FRM) :
R/Data_initial_cleaning.R
: code to clean the field data spreadsheets and produce more adapted datasetsR/Data_salmons_lengths.R
: code to convert the salmon lengths to number of fry and parrR/Data_per_site.R
: code to produce the observations at each site (mean value or functional observations)R/GAMs_all.R
: code to fit several types of GLM/GAM on the data using themgcv
packageR/GAMs_best.R
: among all models, do variable selection to find the best GAM models and save them toout/models
R/GAMs_predictions
: code to calculate the leave-one-out predictions for the GAMsR/FRMs_all.R
: code to fit several types of FRM on the data using theFDboost
packageR/FRMs_best.R
: among all models, select the best FRM models and save them toout/models
R/FRMs_predictions
: code to calculate the leave-one-out predictions for the FRMsR/Models_coefficients.R
: code to extract the coefficients of the best modelsR/Models_performance.R
: compare the results between GAMs and FRMs
A folder for the results at each part of the coding process :
out/data visualisation/*
: raw data visualisation and tablesout/models/*
: fitted final modelsout/coefficients/*
: coefficients of the modelsout/predictions/*
: leave-one-out predictions and goodness-of-fit