dem is expected to contain columns 'day', 'pin', 'guest', 'hw', and all rims. Pin has to represent individuals (weigth are individuals). Ipf will run without guests, guests get the weigth of the hw in the correspondinh household.
1 | dem.weight(dem, rims, crit = 0.5)
|
rims is a named list of n data.frames (or data.tables) each representing a weighting rim. A rim contains the population margins as the last column. Other columns may give the labels for each weigthin cell. Each rim has to sum up to the same total. The order of rims as well as the order of each rim's cells matters.
rim names as well as each rim's levels (numeric or string labels) have to match exactly between rims and dem.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.