sim_data: Simulate unbiased point count and distance sampling data

Description Usage Arguments Value Examples

View source: R/sim_data.R

Description

Generate unbiased point counts and/or distance sampling data. Distance sampling data is created with each dataset, but it can just be ignored if you only want the point count data. This is a rudementary function. Currently it assumes constant density, detection probability, transects length, etc.

Usage

1
2
3
4
5
6
7
8
sim_data(
  n_sites = 50,
  n_samps = 6,
  lambda = 10,
  det_prob = 0.42,
  sigma = NA,
  W = 20
)

Arguments

n_sites

number of sites (transects)

n_samps

number of samples (replicates) per site

lambda

mean number of organisms per site

det_prob

mean detection probability (must be between 0 and 1)

sigma

detection parameter (meters). Just leave this blank and it will be calculated from det_prob

W

transect half-width (meters)

Value

Returns a list of 4 items: 1. "true_N" is a matrix of true abundance values for each site (row) and sample (column). 2. "n_obs" is a matrix of the number of observed organisms at each site (row) and sample (column). 3. "y_list" is a list of vectors. Each vector holds the distance data for a single survey. 4. "inputs" is a list of input values.

Examples

1

philipshirk/nmmsims documentation built on Feb. 26, 2020, 11:27 a.m.