boot_fitstats: Bootstrap Goodness-of-fit Statistics

Description Usage Arguments Value

View source: R/boot_fitstats.R

Description

This function bootstraps p-values for the test statistics calculated with fitstats_optim(). It uses the sim_data() function in this package to simulate unbiased datasets.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
boot_fitstats(
  n_sites,
  n_samps,
  lambda,
  sigma,
  det_prob,
  analysis_method = "optim",
  sampling_method = "distance",
  W = 20,
  nsim = 10,
  parallel = FALSE
)

Arguments

n_sites

Number of sites to simulate

n_samps

Number of samples (replicates) per site to simulate

lambda

mean number of organisms at each site (1 draw per site)

sigma

SD of half-normal detection function

det_prob

mean detection probability (across distances from 0 to W)

sampling_method

either "pointcount' or 'distance'

W

Transect half-width

nsim

number of simulations # progress_bar = FALSE,

parallel

Logical. Whether or not to use parallel processing for the simulations. Defaults to FALSE.

Value

data.frame with 3 columns (1 for each fit statistic) and nsim rows.


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