wigglyOcc | R Documentation |
Function to generate a static occupancy data set with really wiggly covariate relationships in occupancy and detection probability.
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.
wigglyOcc(seed = 1, show.plot = TRUE, verbose = TRUE)
seed |
Seed for random number generator |
show.plot |
choose whether to show plots or not. Set to FALSE when using function in simulations. |
verbose |
if TRUE, output will be written to the console. |
A list with the following elements:
M |
Number of sites |
J |
Number of replicate surveys |
Xsite |
Simulated site covariate, a vector of length M |
Xsurvey |
Simulated survey covariate, a M x J matrix |
psi |
Occupancy probability, a vector of length M |
z |
Realized occupancy, a 0/1 vector of length M |
p |
Detection probability, a M x J matrix |
y |
detection history, a M x J matrix of 0/1 |
Marc Kéry & Andy Royle
Kéry, M. & Royle, J.A. (2016) Applied Hierarchical Modeling in Ecology AHM1 - 10.14.
# Generate data with the default arguments and look at the structure:
tmp <- wigglyOcc()
str(tmp)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.