This is code to go with the paper A latent capture history model for digital aerial surveys by D. L. Borchers, P. Nightingale, B. C. Stevenson, and R. M. Fewster, to appear in the journal Biometrics.
It contains source code for an R package called "twoplane" and a folder called "usercode". You will need to build the package before using it.
It is a standard R package, and has been tested (most recently) with R version 4.0.2.
The package contains a small component written in C++, so it requires a C++ compiler toolchain to be installed.
To build and install the package in R using devtools, you may use the following commands:
Start R and set the working directory to the directory containing this file
install.packages("devtools")
library(devtools)
build()
install()
Now the package should be ready to load:
library(twoplane)
Alternatively, to build and install the package in RStudio: 1. Open the project file: LCE_paper.Rproj 2. Open the Build tab 3. Under "More", select "Clean and Rebuild"
The usercode folder contains three files:
porpoiseFit.R contains code to load and fit to the semi-synthetic porpoise data used in the paper,
sim-longlag.r contains code to do the long-lag simulations, and
sim-shortlag.r contains code to do the long-lag simulations.
Estimates animal density and related parameters from a mark-recapture line transect survey using two cameras, on which recaptures are not identified, there is animal movement and animals' availability is governed by a Markov model.
If you are an RStudio user, you might want to use the R project file LCE_paper.Rproj as your RStudio project file.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.