selectHaulIdsHiearchical: resampling for hiearchical bootstrap. Strucutre is a bit...

Description Usage Arguments Details Value

Description

Makes hiearchical selection of haul ids for bootstrap estimation.

Usage

1
selectHaulIdsHiearchical(hh, levels, selection, seed = NULL)

Arguments

hh

Data set of hauls, formatted as the DATRAS table (could be HH, CA or HL), but containing at most one row pr. haul.

levels

vector with names of columns in hh that represents levels in the hiearchical sampling. levels[1] identifies the primary sampling unit, levels[2] the secondary, and so on.

selection

codes for how selection is done: "R" selection with replacement (sample size: the number of available samples), "S" selection without replacement with sample size a selected as a random integer between 1 and the number of available samples (inclusive), "N": No selection or selection without replacement with sample size: the number of available samples

seed

seed for selection, if NULL seed will not be set.

idname

the name of a column that identifies samples

Details

selectHaulIdsHiearchical

Value

a vector of haul ids, possibly repeating. Note: Does not return a data structure suitable for feeding into functions for CPUE-estimates


natoyaj/TestPackage documentation built on March 11, 2020, 7:46 a.m.