applyCatAdjustmentToSimframe | R Documentation |
Apply categorical adjustments to simframe.
applyCatAdjustmentToSimframe(
Simenv,
varnames,
desired_props,
iteration,
propensities,
print_adj = TRUE
)
Simenv |
simenv receiving object. Simenv$simframe is modified. |
varnames |
varname(s) of variable(s) to adjust, eg: "catpregsmk2" or c("z1msmokeLvl0","z1msmokeLvl1") |
desired_props |
a vector of desired proportions, eg: c(0.1, 0.1, 0.8). Can have a "logisetexpr" attribute - if so, this is evaulated, and becomes a logical vector indicating which observations of "varname" to adjust. (i.e. the "logisetexpr" attribute gives which subset of the data the desired_props are intended for). |
iteration |
the current iteration |
propensities |
named list of propensities for the cat.adjustments |
printAdj |
if TRUE will print new proportions of modified simframe vars |
NULL. simframe in receiving object is modified directly.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.