simMultMix: Simulate the multinomial-mixture model

View source: R/simMultMix_AHM2_2.7.1.R

simMultMixR Documentation

Simulate the multinomial-mixture model

Description

Simulation of "removal" data from a multinomial-mixture model.

Usage

simMultMix(nsites = 100, nsurveys = 3, nyears = 4,
  lambda = 3, theta = 0.5, p = 0.3)

Arguments

nsites

number of sites.

nsurveys

number of replicate (secondary) samples

nyears

number of primary samples: years, seasons etc.

lambda

expected local population size.

theta

availability, the proportion of the population available for detection.

p

detection probability.

Value

A list with the values of the input arguments and the following additional elements:

M

true local population size, vector length nsites

N

true number available for detection, vector length nsites

y

number detected, nsites x nyears x nsurveys

y2d

number detected as a matrix, nsites x (nyears*nsurveys)

Author(s)

Marc Kéry & Andy Royle, adapting code in documentation for gmultmix by Richard Chandler.

References

Chandler, R.B., Royle, J.A. & King. D.I. (2011) Inference about density and temporary emigration in unmarked populations. Ecology, 92, 1429-1435.

Kéry, M. & Royle, J.A. (2021) Applied Hierarchical Modeling in Ecology AHM2 - 2.7.1.

Examples

# Simulate a data set with the default arguments and look at the structure of the output:
tmp <- simMultMix()
str(tmp)

AHMbook documentation built on Sept. 12, 2024, 6:37 a.m.