abinandkr / Ghostbusting

mansucript code and outputs

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Ghostbusting

mansucript code and outputs for MEE paper: Ghostbusting - Reducing bias due to identification errors in spatial capture-recapture histories

Scripts

Contains all the scripts used to generate the results and images in the mansucript.

2Encounter_functions.R - Functions to introduce ghosts in capture histories and fit SCR conditioned on 2 encounters.

CaseStudy.R - Code used to fit SCR and SCR2 models to snow leopard capture histories from Tost and Munkhairkhan.

Likelihood_evaluation_time.R - custom SCR and SCR2 functions to measure computation time.

Simulations.R - Code to simulate the landscapes, populations and and multi detection capture histories. Simulation scenarios fit to SCR and SCR2 to a Poisson detection model.

Simulations_binom.R - Code to simulate binary detection capture histories from simulated populations. Scenarios fit to SCR and SCR2 under a binomial detection model. Simulating the landscapes are time consuming. Simulating populations, capture histories and introducing ghosts are quick and can be regenerated quickly with different simulation parameters. Fitting the models can take time due to the number of simulations - SCR models use the secr package which is fast but SCR2 models use custom code that is yet to be optimised for efficiency. The landscapes, populations, capture histories and model fits are all saved as R objects in the Simulations folder.

SimulationVisualisation.R - Code to generate simulation results in manuscripts including model parameters, tables and images.

SimulationVisualisation_binom.R - Code to generate simulation results including model parameters, tables and images for the binomial detection model included in the supplementary material.

Data

Contains the data used in the case study - a capture history file, a trap file and the mesh used in fitting the SCR model.

Case Study

Contains the results from the case study generated by CaseStudy.R.

Simulations

Contains simulated objects generated by Simulations.R and Simulations_binom.R and the results from SimulationVisualisation.R and SimulationVisualisation_binom.R.

About

mansucript code and outputs


Languages

Language:R 100.0%