applyAllCatAdjustmentsToSimframe: Apply categorical adjustments to simframe.

View source: R/Simenv.r

applyAllCatAdjustmentsToSimframeR Documentation

Apply categorical adjustments to simframe.

Description

Apply categorical adjustments to simframe.

Usage

applyAllCatAdjustmentsToSimframe(
  Simenv,
  iteration,
  propensities = NULL,
  print_adj = TRUE,
  cat.adjustments = Simenv$cat.adjustments
)

Arguments

Simenv

simenv receiving object. Simenv$simframe is modified.

iteration

iteration number - corresponds to a row number in the matrix elements of the cat.adjustments list

propensities

named list of propensities for the cat.adjustments

cat.adjustments

a list of categorical adjustment matrices whose rows each correpond to desired adjustments for an iteration. Each matrix has a 'varname' attribute, indicating which variable in the simenv object is to be adjusted. Each matrix may also have a 'logisetexpr' attribute - if so, this is evaluated and becomes a logical vector indicating which observations of the 'varname' variable to adjust (i.e. the "logisetexpr" attribute gives which subset of the data the row of adjustments are intended for).

printAdj

if TRUE will print new proportions of modified simframe vars

Value

NULL. simframe in receiving object is modified directly.


kcha193/simarioV2 documentation built on April 8, 2024, 4:51 p.m.