This repo contains materials for my talk at the New York Open Statistical Programming meetup. You can find the video of the talk here.
Raking is among the most commonly used algorithms for building survey weights such that a unrepresentative sample can be used to make inferences about the general population.
Regularized Raking extends this framework, allowing for more explicit and granular tradeoffs to be made on properties of the weights set. These properties include how closely the (weighted) sample adheres to population totals, by which distance "closeness" is measured, and how strongly regularized the weights distribution is.
There's a rendered .html of the slides in the top level of this repo, but to reproduce the code and follow along:
- Install rsw using the instructions here: https://github.com/cvxgrp/rsw/tree/master
- Grab the entire reproduction capsule from Chapter 4 of "Target Estimation and Adjustment Weighting for Unrepresentative Survey Samples", from which I (very gratefully) borrow some example polling data and preprocessing functions. Place it in the themed folder as is.
- Run
search_lambdas.qmd, optionally modifying the parameters to determine how much search is done if you're curious. - Run
themed.qmdto reproduce the full analysis and slides.