sim.sscr: Simulating SCR data with second-order spatial dependence

Description Usage Arguments

View source: R/sim.r

Description

Simulates SSCR data.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
sim.sscr(
  fit = NULL,
  traps,
  mask,
  D,
  resp = NULL,
  resp.pars = NULL,
  detfn = "hhn",
  cov.structure = "none",
  re.multiplier = "er",
  det.pars = NULL,
  cov.pars = NULL,
  toa.pars = NULL,
  trunc.acs = TRUE,
  keep.acs = FALSE,
  mask.spacing = NULL
)

Arguments

fit

A fitted model object returned by fit.sscr(). If provided, simulation is based on this fitted model, and all other arguments are ignored.

traps

A matrix with two columns, providing the Cartesian coordinates of the detector locations.

mask

A mask object for integration over the survey area.

D

Animal density (individuals per hectare).

resp

Response distribution for capture history elements. Either "binom" for a binomial distribution, "pois" for a Poisson distribution, "nb" for a negative binomial distribution, "nba" for a negative binomial–alpha distribution, or "cmp" for a Conway-Maxwell-Poisson distribution.

resp.pars

A named vector of additional parameters for the response distribution. If resp is "binom", then this should have a single element named giving the fixed number of trials. If resp is "cmp", then this should have a single element for the start value of the estimated parameter nu (see rcmp). If resp is "nb", then this should have a single element for the start value of the estimated parameter size (see rnbinom).

detfn

Detection function, given by a character string. Use "hn", for halfnormal, "hhn" for hazard halfnormal, and "hr" for hazard rate.

cov.structure

Covariance structure of the random effects. The current options are (1) "none" for no random effects (regular SCR), (2) "independent", for independent random effects (equivalent to counts of detections being overdispersed), (3) "exponential", for random effects with an exponential covariance structure, (4) "sq_exponential" for random effects with a squared exponential covariance structure, (5) "matern", for random effects with a Matern covariance structure, (5) "individual", for random effects that are restricted to being the same at all traps (equivalent to having an independent random effect on lambda0 for each individual), or (6) "lc_exponential" for a linear combination of exponential covariance functions.

re.multiplier

A character string specifying how the expected encounter rate is calculated from the random effect. This is either (1) "er" for multiplication by the baseline encounter rate, or (2) "prob" for multiplication by the baseline encounter probability.

det.pars

List of detection function parameters.

cov.pars

List of covariance parameters.

toa.pars

List of time-of-arrival parameters.

trunc.acs

Logical. If TRUE, activity centres are truncated to the region covered by the mask.

keep.acs

Logical. If TRUE, activity centre locations are returned along with the captures histories.

mask.spacing

Optional. The distance between adjacent mask points. Providing a value will save processing time if activity centres are being truncated to the mask region.


b-steve/sscr documentation built on May 30, 2021, 1:23 a.m.