File tree Expand file tree Collapse file tree
policyengine_us_data/datasets/cps Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -277,16 +277,17 @@ def add_takeup(self):
277277 rng = seeded_rng ("would_claim_wic" )
278278 data ["would_claim_wic" ] = rng .random (n_persons ) < wic_takeup_rate_by_person
279279
280+ # WIC nutritional risk — fully resolved
280281 wic_risk_rates = load_take_up_rate (
281282 "wic_nutritional_risk" , self .time_period
282283 )
283284 wic_risk_rate_by_person = np .array (
284285 [wic_risk_rates .get (c , 0 ) for c in wic_categories ]
285286 )
286- rng = seeded_rng ( "wic_nutritional_risk_imputed" )
287- data [ "wic_nutritional_risk_imputed" ] = (
288- rng .random (n_persons ) < wic_risk_rate_by_person
289- )
287+ receives_wic = baseline . calculate ( "receives_wic" ). values
288+ rng = seeded_rng ( "is_wic_at_nutritional_risk" )
289+ imputed_risk = rng .random (n_persons ) < wic_risk_rate_by_person
290+ data [ "is_wic_at_nutritional_risk" ] = receives_wic | imputed_risk
290291
291292 self .save_dataset (data )
292293
You can’t perform that action at this time.
0 commit comments