do_sim: Run a simulation of a given scenario, fit models, report...

Description Usage Arguments Value Author(s)

Description

Given a simulation scenario, this function will generate from that specification, fit models to the data and record the results.

Usage

1
2
do_sim(nsim, scenario, pred_dat, stratification = c(), logit_opts = NULL,
  transect_id = NULL, cov_values = NULL)

Arguments

nsim

the number of simulations to run

scenario

all the survey information, result of build_sim

pred_dat

prediction data.frame

stratification

the stratification scheme to use for the stratified Horvtiz-Thompson estimate, specified as internal cutpoints

logit_opts

list of length 2, of parameters (scale and location) for the logistic that controls the behaviour of covariates when they are used. See build_sim_covar for more details.

transect_id

vector of the same length as the number of segments, used to group them for the Horvitz-Thompson estimate

Value

data.frame with one row per (successful) simulation. The data.frame has the following columns:

model

which model was fitted to the data

iter

which simulation this result is for

quantile

the quantile of the estimated distribution of abundance that the true abundance is in

Nhat

the estimated abundance

cvN

the coefficient of variation of the estimated abundance

n

number of observed objects

sp1

smoothing parameter 1

sp2

smoothing parameter 2

Author(s)

David L Miller


dill/ltdesigntester documentation built on May 15, 2019, 8:30 a.m.