Seal Molt Model

Programs for fitting progress of molt in elephant seals, written in C++. THe program should work on a Linux system as is, with the data included, but knowledge of C++ and Bayesian statistics are to understand the output or adapt the code. The program fits a logistic curve to observations that increa...

Full description

Bibliographic Details
Main Author: Condit, Richard
Format: Other/Unknown Material
Language:unknown
Published: Zenodo 2024
Subjects:
Online Access:https://doi.org/10.5281/zenodo.10728682
Description
Summary:Programs for fitting progress of molt in elephant seals, written in C++. THe program should work on a Linux system as is, with the data included, but knowledge of C++ and Bayesian statistics are to understand the output or adapt the code. The program fits a logistic curve to observations that increase from 0 to 100 for multiple individuals across multiple years. The logistic parameters include a hyperdistribution across years and animals. Files with extension .h or .cpp contain the code: 1) modelMolt.h defines the molt class and runs all calculations, and includes subroutines in header files 2) utilities.cpp has commonly used subroutines 3) util.h has commonly used subroutines 4) Array2D.h is used within subroutines 5) likelihood.h has common likelihood functions for statistical calculations 6) statistics.h has common statistical functions 7) randomgenerator.h has a random number generator 8) modelMolt.cpp has the main function, accepting command-line parameters and executing a complete run The file FemaleMolt.csv has sample data. It includes 4 tab-delimited columns: 1) animalID is an arbitrary identifier of individuals, always an integer 2) year is an integer 3) yday is day of the year, with 1=1Jan, treated as a double 4) molt is observation of the molt status of the given animal on the given day, always in [0,100], a double First 7 rows of data showing observed molt progress in animal 44168 in year 2016: animalID year yday molt 44168 2016 126 0 44168 2016 129 0 44168 2016 130 0 44168 2016 137 0 44168 2016 139 5 44168 2016 146 15 44168 2016 171 100 To illustrate compilation, assume file #7 and the data file are in a folder FOLDERNAME. The following creates an executable program in FOLDERNAME: cd FOLDERNAME g++ -Wall modelMolt.cpp -o modelMolt.exe 2>&1 | more g++ -Wall modelMolt.cpp -o modelMolt.exe Before executing, check lines 103-104 in modelMolt.h. They identify a folder where results will be written. Those should be renamed as needed, and both files must be created before executing. Then, to execute ...