sim.pdata: Simulate non-hierarchical point transect (= point count) data
Description
Function simulates coordinates of individuals on a square with a count location at the center point.
Usage
sim.pdata(N = 1000, sigma = 1, B = 3, keep.all = FALSE, show.plot = TRUE)
Value
A list with the following elements:
- N
total population size in the square
- sigma
scale of half-normal detection function
- B
circle radius
- u1, u2
the x and y coordinates of each of the individuals
- d
the distance of each individual from the center of the circle
- y
a 0/1 indicator showing whether each individual is detected or not, a vector of length N
- N.real
the realized number of individuals within the circle of radius B
Arguments
- N
total population size in the square
- sigma
scale of half-normal detection function
- B
circle radius; the data are simulated over a square of side 2 * B, but individuals outside the circle of radius B are not detected.
- keep.all
if TRUE, the data for all individuals are returned; if FALSE, only for individuals detected.
- show.plot
choose whether to show plots or not. Set to FALSE when using function in simulations.
Author
Marc Kéry & Andy Royle
References
Kéry, M. & Royle, J.A. (2016) Applied Hierarchical Modeling in Ecology AHM1 - 8.2.5.1.
Examples
Run this code# Simulate a data set with the default arguments and look at the structure of the output:
tmp <- sim.pdata()
str(tmp)
Run the code above in your browser using DataLab