simDat19B: Simulate data for Chapter 19B: Binomial N-mixture Model

simDat19BR Documentation

Simulate data for Chapter 19B: Binomial N-mixture Model

Description

Function simulates replicated count data as used in the bonus Chapter 19B in the ASM book. Abundance, detection and count data simulation is undertaken for the approximate elevation of the actual sample of survey sites in the Swiss breeding bird survey "Monitoring Häufige Brutvögel" (MHB). Note there is no nSites argument, since this is given in the MHB survey at 267.

Usage

simDat19B(
  nVisits = 3,
  alpha.lam = -3,
  beta1.lam = 8.5,
  beta2.lam = -3.5,
  alpha.p = 2,
  beta.p = -2,
  show.plot = TRUE
)

Arguments

nVisits

Number of occasions, or visits per site

alpha.lam

Intercept of the regression of log expected abundance on scaled elevation

beta1.lam

Linear effect of scaled elevation on log expected abundance

beta2.lam

Quadratic effect of scaled elevation on log expected abundance

alpha.p

Intercept of the regression of logit detection on scaled elevation

beta.p

Linear effect of scaled elevation on logit detection

show.plot

Show plot of simulated output?

Value

A list of simulated data and parameters.

nSites

Number of sites

nVisits

Number of visits to each site

alpha.lam

Abundance intercept

beta1.lam

Linear effect of elevation on abundance

beta2.lam

Quadratic effect of elevation on abundance

alpha.p

Detection intercept

beta.p

Linear effect of elevation on detection

mhbElev

Elevation covariate values

mhbElevScaled

Scaled elevation covariate values

lambda

Expected abundance for each site

N

True abundance at each site

p

Detection probability at each site

C

Observed repeated counts at each site

nocc.true

True number of occupied sites

nocc.app

Apparent number of occupied sites

psi

True proportion of occupied sites

psi.app

Apparent proportion of occupied sites

opt.elev.true

Optimal elevation value

totalN.true

True total population size

totalN.app

Apparent total population size

Author(s)

Marc Kéry

Examples

# With implicit default function argument values
str(simDat19B())

# With explicit function argument values
str(simDat19B(nVisits = 3, alpha.lam = -3, beta1.lam = 8.5, beta2.lam = -3.5, 
    alpha.p = 2, beta.p = -2, show.plot = TRUE))

# No plots
str(simDat19B(show.plot = FALSE))

# More visits
str(simDat19B(nVisits = 10))

# A single visit at each site
str(simDat19B(nVisits = 1))

# Greater abundance
str(simDat19B(alpha.lam = 0))

# Much rarer abundance
str(simDat19B(alpha.lam = -5))

# No quadratic effect of elevation on abundance (only a linear one)
str(simDat19B(beta2.lam = 0))

# No effect of elevation at all on abundance
str(simDat19B(beta1.lam = 0, beta2.lam = 0))

# Higher detection probability (intercept at 0.9)
str(simDat19B(alpha.p = qlogis(0.9), beta.p = -2))

# Higher detection probability (intercept at 0.9) and no effect of elevation
str(simDat19B(alpha.p = qlogis(0.9), beta.p = 0))

# Perfect detection (p = 1)
str(simDat19B(alpha.p = 1000))

# Positive effect of elevation on detection probability (and lower intercept)
str(simDat19B(alpha.p = -2, beta.p = 2))


ASMbook documentation built on Sept. 11, 2024, 5:38 p.m.

Related to simDat19B in ASMbook...