What is Raking (iterative proportional fitting)?

Raking (iterative proportional fitting) is a survey-weighting method that adjusts sample weights so the distribution of key characteristics (margins) in your respondents matches known population totals. It does this by repeatedly reweighting the sample across each characteristic until the margins align.

Raking, also called iterative proportional fitting (IPF), is used when you want survey results to reflect a target population on several demographic or other categorical variables (for example: age, gender, and region). Instead of requiring every combination of those variables to be present in your sample, raking adjusts respondent weights so the marginal distributions (the totals for each age group, each gender, each region) match known population controls. The algorithm cycles through the chosen variables, scaling weights for each category in turn, and repeats until the sample margins are close to the targets or a convergence rule is met. Raking is widely used because it can produce more representative estimates without building full cross-classified cells.

Usage example

You run a community feedback survey and have 800 responses. The city population is 52% female, 48% male; 30% aged 18–34, 40% aged 35–54, 30% 55+; and 60% urban, 40% rural. Your unweighted sample differs from these margins. You apply raking on gender, age group and urban/rural status so the weighted survey counts match the city's known proportions. After raking, estimates (like satisfaction rates) better reflect the city's population structure.

Practical application

Why raking matters: - Produces estimates that better represent a target population when your sample over- or under-represents groups. - Requires only marginal population totals (which are often available), so it’s more feasible than full post-stratification when cell counts would be sparse. - Keeps surveys comparable across rounds or subgroups by aligning to common controls. Practical cautions: - Raking only corrects for differences related to the variables you include; it cannot fix bias from unobserved factors. - It can inflate variance and produce extreme weights if some groups are very small in your sample; weight trimming or caps are common remedies. - Monitor convergence and check weighted distributions and effective sample size before using raked results for inference.

FAQ

How is raking different from post‑stratification?

Post‑stratification adjusts weights for every cell in a full cross‑classification (e.g., age × gender × region), which requires sufficient sample in each cell. Raking only matches marginal totals for each variable separately and does not require every combination to be present, so it’s more practical when cells are sparse.

Can raking fix nonresponse bias?

Raking can reduce nonresponse bias to the extent that nonresponse is related to the variables you control (the margins you use). It cannot correct bias caused by unobserved factors that are not included in the raking variables.

Are there practical limits on how many variables I should include?

Yes. Including more variables can improve bias correction but also increases the chance of extreme weights, convergence problems, and higher variance. Choose variables that are strongly related to both response propensity and key survey outcomes, and check weight distributions and effective sample size; consider trimming extreme weights if necessary.