With microdata or a table that includes both

rake_spf(outcome_var, data, fix_to, area_var, count_var = "count")

Arguments

outcome_var

A string for the variable to match the proportion to

data

Data of microdata or tables whose margin on outcom_var must be fixed

fix_to

A dataset with only marginal counts or proportions of the outcome in question, by each area. Proportions will be corrected so that the margins of the synthetic joint will match these, with a simple ratio.

area_var

A character vector of the area of interest.

count_var

A character variable that specifies which variable in poptable indicates the count