AddPsuStratificationVariables: Add Stratification columns to 'PSUSamplingParametersData'

View source: R/StoxAnalyticalBaselineFunctions.R

AddPsuStratificationVariablesR Documentation

Add Stratification columns to 'PSUSamplingParametersData'

Description

Add additional variables to encode strata and its correspondance with census data (e.g. landings data).

Usage

AddPsuStratificationVariables(
  PSUSamplingParametersData,
  StratificationVariables,
  StratificationVariablesTable = data.table::data.table()
)

Arguments

PSUSamplingParametersData

Sampling parameters stratification variables should be added to

StratificationVariables

name of variables to add

StratificationVariablesTable

value-combinations for the variables to add to each stratum

Details

PSUSamplingParametersData provide sampling parameters by strata. Optionally, it may also contain additional variables that encode the stratification in terms of variables available in other data sources, such as StoxLandingData. This function allows such variables to be added, if not already present.

More detailed encoding of stratification is useful for encoding the sampling frame of the design provided by 'PSUSamplingParametersData'. By encoding all strata in terms of variables that are available in census-data, the correspondance between sampling frame and target population can be encoded. This information will be available in downstream estimates (e.g. AnalyticalPopulationEstimate) and allow for pragmatic inference to out-of-frame strata (via ExtendAnalyticalSamplingFrameCoverage).

Value

PSUSamplingParametersData

See Also

ReadPSUSamplingParameters, ComputePSUSamplingParameters, AssignPSUSamplingParameters, AnalyticalPopulationEstimate


StoXProject/RstoxFDA documentation built on June 14, 2025, 1:37 a.m.