resample.data: Resamples the data for the bootstrap

Description Usage Arguments Details Value Note Author(s)

View source: R/resample.data.R

Description

Can either resample samples within strata or observations within samples

Usage

1
2
3
4
5
6
7
8
resample.data(
  resample,
  obs.table,
  sample.table,
  ddf.dat.master,
  double.observer,
  subset.variable = "species"
)

Arguments

resample

if "samples" resample samples within strata, if "observations" resample observations within samples.

obs.table

dataframe of observation records with fields object, Region.Label, and Sample.Label which give links to sample.table, region.table and the data records used in model

sample.table

dataframe of sample records - Region.Label, Sample.Label, Effort

ddf.dat.master

list of complete/original datasets

double.observer

boolean indicating if it is a double observer survey

subset.variable

character describing which variable in the dataset should be used in subsetting the data.

Details

Once the observations have been resampled duplicates are given a different object id and the obs.table is updated appropriately.

Value

a list with 2 elements: ddf.dat.working a list of resampled datasets to be used in the analyses obs.table an updated obs.table with additional entries for data replicates

Note

Internal function not intended to be called by user.

Author(s)

Laura Marshall


mads documentation built on July 2, 2020, 2:12 a.m.