issj.sim {AHMbook}  R Documentation 
Simulate open distance sampling data for the Island Scrub Jays
Description
Function to simulate open distance sampling data for the Island Scrub Jays, based on Sollmann et al (2015).
To recreate the data sets used in the book with R 3.6.0 or later, include sample.kind="Rounding"
in the call to set.seed
. This should only be used for reproduction of old results.
Usage
issj.sim(B, db, lam, sigma, phi, gamma, npoints, nyrs, nbsize = 1.02)
Arguments
B 
Radius of the circle sampled; a site is a circle of radius B around a point. 
db 
Distance categories; a vector of cut points from 0 to B inclusive. 
lam 
Expected abundance per site, a vector of length 
sigma 
Scale parameter of the halfnormal detection function at each site, a vector of length 
phi 
Survival probability 
gamma 
Recruitment rate 
npoints 
Number of sites where point counts are conducted. 
nyrs 
Number of years 
nbsize 
Size parameter for the negative binomial distribution used to generate individual counts per site for year 1. 
Value
A list with the following elements:
NcList 
A list with one element per year, with distances of all animals from the point. 
detList 
A list with one element per year, a 
N 
The (true) number of animals at each point for each year, a 
cell 
The site IDs where point counts are conducted. 
y 

dclass 
a vector with the distance class for each animal detected 
site 
a corresponding vector with the site for each animal detected 
nsite 
the number of sites in the study area 
lam , phi , gamma , sigma 
the values of the corresponding arguments 
Author(s)
Marc Kéry & Andy Royle, based on Sollmann et al (2015)
References
Sollmann, R., Gardner, B., Chandler, R.B., Royle, J.A., Sillett, T.S. (2015) An open population hierarchical distance sampling model. Ecology 96, 325331.
Kéry, M. & Royle, J.A. (2016) Applied Hierarchical Modeling in Ecology AHM1  9.7.1.
Examples
# A toy example with just 20 sites
set.seed(2015)
tmp < issj.sim(B = 300,
db = c(0,50, 100, 150, 200, 250, 300),
lam = c(3.01, 7.42, 20.51, 1.60, 0.42, 3.42, 8.24, 0.66, 0.32, 0.39, 0.46, 0.52,
0.63, 0.36, 4.93, 0.47, 2.07, 0.42, 0.48, 0.47),
sigma = c(110, 91, 70, 114, 135, 101, 88, 130, 133, 134, 134, 135, 131, 135, 100,
135, 110, 135, 134, 135),
phi = 0.6, gamma = 0.35,
npoints = 15, nyrs = 4)
str(tmp)
# Compare the number detected with the true numbers present
with(tmp, cbind(y, N[cell, ]))