sim_data_p: Simulate biased (via over-dispersion in p) point count and...

Description Usage Arguments Value Examples

View source: R/sim_data_p.R

Description

Generate point counts and/or distance sampling data that is biased by over-dispersion in the detection probability, p. 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
 9
10
sim_data_p(
  n_sites = 50,
  n_samps = 6,
  lambda = 10,
  mean_det_prob = 0.42,
  sigma_beta_dist_p = 0.01,
  alpha = NA,
  beta = NA,
  W = 20
)

Arguments

n_sites

number of sites (transects)

n_samps

number of samples (replicates) per site

lambda

mean abundance at every site

mean_det_prob

mean detection probability across all sites and replicates (different value drawn for each site and replicate)

sigma_beta_dist_p

SD of a beta distribution from which the realized detection probability is drawn (keep this below ~ 0.16)

alpha

parameter of the beta distribution. This is deterministically calculated from mean_det_prob and sigma_beta_dist_p if they are provided.

beta

parameter of the beta distribution. This is deterministically calculated from mean_det_prob and sigma_beta_dist_p if they are provided.

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.