linkPSU2Stratum: Bootstrap utils.

Description Usage Arguments Value

Description

linkPSU2Stratum Adds stratum information to a data frame with one row per PSU. Stratum ID, Area, number of PSUs and positive PSUs are added, and rows are generated for strata with non-positive density.

checkNumPSUsInStratum Checks for numner of PSUs >= 2 in each stratum, which is a requirement for variance estimation, and should possibly be a requirement for the bootstrapping when one of the methods is PSU~Stratum.

Usage

1
2
3
4
linkPSU2Stratum(x, projectName, psustratum = NULL, StratumArea = NULL,
  list.out = TRUE, ignore.case = TRUE, fill0 = TRUE)

checkNumPSUsInStratum(projectName)

Arguments

x

A data frame with with one row per PSU, to which Stratum information should be added.

projectName

The name or full path of the project, a baseline object (as returned from getBaseline or runBaseline, og a project object (as returned from openProject).

psustratum

A data frame linking PSUs to stratum IDs. Should have the columns 'Stratum' and 'PSU' or 'SampleUnit'. Read from the project if missing.

StratumArea

A data frame providing the area of each stratum. Should have the columns 'Area' and 'PolygonKey' or 'Stratum'. Read from the project if missing.

list.out

Logical: If TRUE, split the data frame into a list per species category SpecCat.

ignore.case

Logical: If TRUE, ingore case when splitting by species category SpecCat.

Value

A list with names "Stratum" and "Total" containing dataframes for each species with the following columns: Stratum, Mean, SD (standard deviation), Variance, CV (coefficient of variation), and lower and upper 90


Sea2Data/Rstox documentation built on May 14, 2019, 8:58 a.m.