Simulate a multi-season integrated occupancy data set
Source:R/dyn_int_occu.R
simulate_dyn_int_occu.RdDraws from the dyn_int_occu() model: a dynamic (multi-season) occupancy
process (psi1, colonization gamma, extinction eps) observed by S
detection sources with per-source detection probability.
Usage
simulate_dyn_int_occu(
N = 200,
T_seasons = 4,
S = 2,
J = 3,
psi1 = 0.5,
gamma = 0.3,
eps = 0.2,
p = c(0.4, 0.6),
field = NULL,
trend = NULL,
source_seasons = NULL,
seed = NULL
)Arguments
- N
Number of sites (default 200).
- T_seasons
Number of seasons (default 4).
- S
Number of detection sources (default 2).
- J
Visits per source (scalar or length-
S; default 3).- psi1, gamma, eps
Season-1 occupancy, colonization, extinction (defaults 0.5 / 0.3 / 0.2).
- p
Per-source detection probabilities (length-
S; default 0.4 / 0.6).- field
Optional per-site shared areal field (length
N) added to the first-season occupancy logit – the shared field of the multi-season integrated spatial model (stIntPGOcc). DefaultNULL(no field).- trend
Optional per-site varying-coefficient (SVC) areal field (length
N); with a covariatew ~ N(0,1)stored indata, the first-season logit gainsw * trendon top offield– the svcTIntPGOcc surface. DefaultNULL. When set,datacarries acellnode index (1..N) and the covariatewfor the barspatial(~ 1 + w || cell, graph).- source_seasons
Optional length-
Slist;source_seasons[[s]]is the integer vector of seasons sourcesobserves (partial season overlap). The seasons a source does not cover are set toNAin its array – the staggered survey where sources rarely share the full season grid. DefaultNULL(every source observes every season).- seed
Optional random seed.
Examples
sim <- simulate_dyn_int_occu(N = 40, T_seasons = 3, seed = 1)
lapply(sim$y, dim)