From 07442614f5702682062e29b4ceeb3c03063f03b1 Mon Sep 17 00:00:00 2001 From: Vedant Rathi <72925608+vrathi101@users.noreply.github.com> Date: Sat, 14 Dec 2024 05:07:31 +0000 Subject: [PATCH] Incorporate take-up of itemized medical deduction --- changelog_entry.yaml | 4 ++++ policyengine_us_data/datasets/cps/cps.py | 8 ++++++++ 2 files changed, 12 insertions(+) diff --git a/changelog_entry.yaml b/changelog_entry.yaml index e69de29..aa159f0 100644 --- a/changelog_entry.yaml +++ b/changelog_entry.yaml @@ -0,0 +1,4 @@ +- bump: minor + changes: + added: + - Incorporate take-up of itemized medical deduction. \ No newline at end of file diff --git a/policyengine_us_data/datasets/cps/cps.py b/policyengine_us_data/datasets/cps/cps.py index 64c1b1c..0522d86 100644 --- a/policyengine_us_data/datasets/cps/cps.py +++ b/policyengine_us_data/datasets/cps/cps.py @@ -137,6 +137,14 @@ def add_takeup(self): generator.random(len(data["tax_unit_id"])) < eitc_takeup_rate ) + itemized_medical_deduction_takeup_rate = ( + parameters.gov.irs.deductions.itemized.medical.takeup + ) + data["takes_up_itemized_medical_deduction"] = ( + generator.random(len(data["tax_unit_id"])) + < itemized_medical_deduction_takeup_rate + ) + self.save_dataset(data)