prorate.row | R Documentation |
Reconcile row by row, when using region control totals, while updating initial estimates of
male/female regional total values if difference is NOT zero, adjust actual data. This function
will be run iteratively through each row of a dataframe already prepared by running through
calc.cols
while the row's difference is not zero. For example, for 1:n_Sex, prorate
so that region totals sum to region control totals. This is a helper function used in dbRake
.
prorate.row(CurrRow, n_colGrps, allowNegatives)
CurrRow |
a dataframe of a row to prorate |
n_colGrps |
the number of groups to adjust over (e.g., number of groups in region) |
allowNegatives |
a logical of whether negative population values are allowed (usually FALSE) |
original dataframe of row, that is now prorated by the adjustment values
The overall raking function: dbRake
()
Other raking helpers:
add.random.fraction.to.cols()
,
adjustSex()
,
allowNegsnoMargin()
,
calc.cols()
,
multiRake()
,
noNegsneedMargin()
,
noNegsnoMargin()
,
prep.prorate.col()
,
prorate.col()
,
prorate()
,
read.inputs()
,
real.to.int()
,
rename.age.grps()
,
rounded()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.