diff --git a/changelog_entry.yaml b/changelog_entry.yaml index e69de29b..5b6a324c 100644 --- a/changelog_entry.yaml +++ b/changelog_entry.yaml @@ -0,0 +1,4 @@ +- bump: patch + changes: + fixed: + - Zero out fuel spending for households without fuel consumption diff --git a/docs/imputations.md b/docs/imputations.md index 63c15df4..9e6964ed 100644 --- a/docs/imputations.md +++ b/docs/imputations.md @@ -106,6 +106,8 @@ LCFS 2-week diaries undercount fuel purchasers (58%) compared to actual vehicle 4. **At FRS imputation time**: Compute `has_fuel_consumption` directly from `num_vehicles` (already calibrated to NTS targets) +5. **Zero non-fuel households**: After imputation, set `petrol_spending` and `diesel_spending` to zero for households where `has_fuel_consumption = 0` + This ensures fuel duty incidence aligns with actual vehicle ownership (~70% of households = 78% vehicles × 90% ICE) rather than LCFS diary randomness. --- diff --git a/policyengine_uk_data/datasets/imputations/consumption.py b/policyengine_uk_data/datasets/imputations/consumption.py index 49d4127c..34cbdc8b 100644 --- a/policyengine_uk_data/datasets/imputations/consumption.py +++ b/policyengine_uk_data/datasets/imputations/consumption.py @@ -344,6 +344,12 @@ def impute_consumption(dataset: UKSingleYearDataset) -> UKSingleYearDataset: for column in output_df.columns: dataset.household[column] = output_df[column].values + # Zero out fuel spending for households without fuel consumption + # This ensures only ICE vehicle owners contribute to fuel duty + no_fuel = has_fuel_consumption == 0 + dataset.household["petrol_spending"][no_fuel] = 0 + dataset.household["diesel_spending"][no_fuel] = 0 + dataset.validate() return dataset