- 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
.
- Questions regarding the code or the data should be sent to [email protected]
The research entitled Modelling fish physico-thermal habitat selection using functional regression was published in Journal of Ecohydraulics in 2021.
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 themgcvpackageR/GAMs_best.R: among all models, do variable selection to find the best GAM models and save them toout/modelsR/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 theFDboostpackageR/FRMs_best.R: among all models, select the best FRM models and save them toout/modelsR/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
