Simulation for multiple-visit data (from pcountOpen
help file in package unmarked). simDM0
has no covariates while simDM
allows for covariates. Both functions assume constant time intervals between primary periods.
simDM0(nsites = 50, nsurveys = 3, nyears = 5,
lambda = 4, gamma = 1.5, phi = 0.8, p = 0.7, show.plots=TRUE)simDM(nsites = 50, nsurveys = 3, nyears = 5,
mean.lambda = 4, mean.gamma.rel = 0.5,
mean.phi = 0.8, mean.p = 0.7,
beta.lam = 1, beta.gamma = 1, beta.phi = -1, beta.p = -1,
show.plots=TRUE)
number of sites.
number of replicate (secondary) samples within period of closure.
number of primary samples: years, seasons etc.
Initial expected abundance.
recruitment rate.
apparent survival rate.
detection probability.
Initial expected abundance at cov.lam = 0.
recruitment rate at cov.gamma = 0.
apparent survival rate at cov.phi = 0.
detection probability at cov.p = 0.
the slope of parameter lambda (link transformed) on the cov.lam covariate
the slope of parameter gamma (link transformed) on the cov.gamma covariate
the slope of parameter phi (link transformed) on the cov.phi covariate
the slope of parameter p (link transformed) on the cov.p covariate
if TRUE, plots are produced. Set this to FALSE when running simulations.
For simDM0
, a list with the values of the input arguments and the following additional elements:
true number of individuals, nsites x nyears
number of survivors, nsites x (nyears-1)
number of recruits, nsites x (nyears-1)
number detected, nsites x nyears x nsurveys
number detected as a matrix, nsites x (nyears*nsurveys)
simDM has the following additional elements:
covariate for lambda generated from Uniform(-1, 1), nsites vector
covariate for gamma generated from Uniform(-1, 1), nsites vector
covariate for phi generated from Uniform(-1, 1), nsites vector
covariate for p generated from Uniform(-1, 1), nsites x nyears x nsurveys
cov.p formatted as a matrix, nsites x (nyears*nsurveys)
Dail, D. & Madsen, L. (2011) Models for estimating abundance from repeated counts of an open metapopulation. Biometrics, 67, 577-587.
K<U+00E9>ry, M. & Royle, J.A. (2021) Applied Hierarchical Modeling in Ecology AHM2 - 2.5.
# NOT RUN {
# Simulate a data set with the default arguments and look at the structure of the output:
tmp0 <- simDM0()
str(tmp0)
tmp <- simDM()
str(tmp)
# }
Run the code above in your browser using DataLab