simSpatialDSte {AHMbook}R Documentation

Simulate data for replicate line transect surveys with temporary emigration

Description

This simulates line transect distance sampling data with a spatial distribution of objects in a heterogeneous landscape where the parameter beta controls the effect of habitat. Multiple sample occasions are simulated and temporary emigration is allowed (parameter phi). Habitat is simulated according to a Gaussian random field model defined within the function. Uses a half normal detection model (if perp = TRUE) or a Gaussian hazard model (perp = FALSE).

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.

Usage

simSpatialDSte(nsites=28, dim=10, beta=1, lam0=2.5, nsurveys=4, sigma=3,
  phi=0.6, theta=2, show.plots=3)

Arguments

nsites

number of sites

dim

number of pixels along each side of the square site

beta

the effect of habitat on the number of individuals in a pixel.

lam0

expected population size at each site

nsurveys

the number of replicate surveys

sigma

scale of half-normal detection function

phi

probability an individual is available for detection, ie, not temporarily emigrated.

theta

exponential correlation in the spatial covariate.

show.plots

the number of sites for which plots should be displayed; set to 0 to suppress plotting.

Value

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

npixels

the number of pixels in each site (= dim^2)

B

distance from line to edge of square (= dim/2)

M

true number of individuals at each site

d

perpendicular distance of each pixel from the line

Habitat

pixels x sites matrix, value of habitat covariate for each pixel

y

sites x pixels x surveys array, number of animals detected

Counts

sites x surveys matrix, number of animals detected (summed over pixels)

Author(s)

Mizel et al (2018) Appendix S1, based in turn on Kéry & Royle (2016).

References

Kéry, M. & Royle, J.A. (2016) Applied Hierarchical Modeling in Ecology.

Mizel, J.D., Schmidt, J.H., & Lindberg, M.S. (2018) Accommodating temporary emigration in spatial distance sampling models. Journal of Applied Ecology, 55, 1456-1464.

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

Examples

# Run the function with default values and look at the output
str(tmp <- simSpatialDSte())

[Package AHMbook version 0.2.3 Index]