PolicyEngine / policyengine-us

The PolicyEngine US Python package contains a rules engine of the US tax-benefit system, and microdata generation for microsimulation analysis.
https://policyengine.org/us
GNU Affero General Public License v3.0
102 stars 174 forks source link

Randomly allocate people to sub-state level in microdata generation #3473

Open MaxGhenis opened 9 months ago

MaxGhenis commented 9 months ago

We do this in the UK.

This will let us avoid randomness in formulas affecting individual simulations.

martinholmer commented 9 months ago

@MaxGhenis titled issue #3473 as follows: Randomly allocate people to sub-state level in microdata generation

I'm assuming that this to be done when the enhanced CPS dataset is generated and to be done in a way that respects the known values of county_fips. Respecting the known values would mean leaving non-zero county_fips values unchanged and imputing a positive value for each household with a zero county_fips value. This imputation would assign positive values only from areas for which Census does not report positive values in that state. This is important because otherwise some of the zeros in California would be incorrectly imputed to be living in Los Angeles County or San Diego County.

@MaxGhenis, Is my understanding of your enhancement request correct?

MaxGhenis commented 9 months ago

That's right @martinholmer