sim.occu.data: Simulate species occurrence and observation data

Description Usage Arguments Details Value Examples

View source: R/simulation_functions.R

Description

Simulate species occurrence and observation data

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
sim.occu.data(
  year,
  habcov,
  site.data,
  nocc,
  p,
  observer.names = NULL,
  vis.probs = c(0.7, 0.3),
  meanoccu = NULL,
  beta1 = 2
)

Arguments

year

numeric value for survey year

habcov

dataframe containing IDs, x-y coordinates, and habitat covariate values for all sites

site.data

dataframe containing site-level data for surveyed sites

nocc

numeric value indicating the number of survey occasions conducted per site

p

dataframe containing detection probabilities

observer.names

vector of character strings containing names of observers conducting surveys

vis.probs

vector of length 2 containing probability of "good" and "poor" visibility occurring any given survey

meanoccu

value between 0 and 1 used as intercept of linear model for species occurrence probability

beta1

value used as slope coefficient for relationship between species occurrence probability and a habitat covariate

Details

Argument value for p should have 2 rows and 2 columns. Rows correspond to 2 levels of detection probability corresponding to "good" (row 1) and "poor" (row2) visibility. Column 1 contains category names (good/poor) as character strings and column 2 contains numeric values for p.

Default value for meanoccu argument is NULL which results in a random value selected from a set of values ranging between 0.6 and 0.9 at 0.05 increments. Actual intercept value used in data simulation is transformed to the logit scale.

Default value for beta1 is 2 on the logit scale.

Value

A dataframe containing all simulated species occurrence and observation data

Examples

1
2
3
4
5
6
7
## Not run: 
nocc <- 5
p <- data.frame(label = c("good","poor"), p = c(0.7,0.3))
occu.data <- sim.occu.data(year = 2020, habcov = habcov, site.data = site.data, nocc = nocc, p = p)
str(occu.data)

## End(Not run)

USFWS/SppDistMonProj documentation built on May 27, 2020, 9:44 a.m.