\subsection{Loss Matrix Construction}

The loss matrix measures deviation from over 7,000 administrative targets sourced from six authoritative data sources: IRS Statistics of Income (SOI), Census population estimates, Congressional Budget Office (CBO) projections, Treasury Department data, Joint Committee on Taxation (JCT) estimates, and healthcare spending patterns. This comprehensive calibration ensures the enhanced dataset accurately represents both tax filing patterns and demographic distributions.

\subsubsection{IRS Statistics of Income Targets}

For each combination of AGI bracket and filing status, we create targets for:

\begin{itemize}
    \item Adjusted gross income
    \item Count of returns
    \item Employment income
    \item Business net profits
    \item Capital gains (gross)
    \item Ordinary dividends
    \item Partnership and S-corporation income
    \item Qualified dividends 
    \item Taxable interest income
    \item Total pension income
    \item Total social security
\end{itemize}

For aggregate-level targets only, we track:
\begin{itemize}
    \item Business net losses
    \item Capital gains distributions
    \item Capital gains losses
    \item Estate income and losses
    \item Exempt interest
    \item IRA distributions
    \item Partnership and S-corporation losses
    \item Rent and royalty net income and losses
    \item Taxable pension income
    \item Taxable social security
    \item Unemployment compensation
\end{itemize}

\subsubsection{Census Population Targets}

From Census population projections (np2023\_d5\_mid.csv), we include:
\begin{itemize}
    \item Single-year age population counts from age 0 to 85
    \item Filtered to total population (SEX = 0, RACE\_HISP = 0)
    \item Projected to the target year
\end{itemize}

\subsubsection{CBO Program Totals}

From CBO projections, we calibrate:
\begin{itemize}
    \item Income tax
    \item SNAP benefits
    \item Social security benefits
    \item SSI payments
    \item Unemployment compensation
\end{itemize}

\subsubsection{EITC Statistics}

From Treasury EITC data (eitc.csv), we target:
\begin{itemize}
    \item EITC recipient counts by number of qualifying children
    \item Total EITC amounts by number of qualifying children
\end{itemize}

The EITC values are uprated by:
\begin{itemize}
    \item EITC spending growth for amounts
    \item Population growth for recipient counts
\end{itemize}

\subsubsection{CPS-Derived Statistics}

We calibrate to hardcoded totals for:
\begin{itemize}
    \item Health insurance premiums without Medicare Part B: \$385B
    \item Other medical expenses: \$278B
    \item Medicare Part B premiums: \$112B
    \item Over-the-counter health expenses: \$72B
    \item SPM unit thresholds sum: \$3,945B
    \item Child support expense: \$33B
    \item Child support received: \$33B
    \item SPM unit capped work childcare expenses: \$348B
    \item SPM unit capped housing subsidy: \$35B
    \item TANF: \$9B
    \item Alimony income: \$13B
    \item Alimony expense: \$13B
    \item Real estate taxes: \$400B
    \item Rent: \$735B
\end{itemize}

\subsubsection{Market Income Targets}

From IRS SOI PUF estimates:
\begin{itemize}
    \item Total negative household market income: -\$138B
    \item Count of households with negative market income: 3M
\end{itemize}

\subsubsection{Healthcare Spending by Age}

Using healthcare\_spending.csv, we target healthcare expenditures by:
\begin{itemize}
    \item 10-year age groups
    \item Four expense categories:
    \begin{itemize}
        \item Health insurance premiums without Medicare Part B
        \item Over-the-counter health expenses
        \item Other medical expenses
        \item Medicare Part B premiums
    \end{itemize}
\end{itemize}

\subsubsection{AGI by SPM Threshold}

From spm\_threshold\_agi.csv, we target:
\begin{itemize}
    \item Adjusted gross income totals by SPM threshold decile
    \item Count of households in each SPM threshold decile
\end{itemize}

\subsubsection{State Population Targets}

From Census state population data (population\_by\_state.csv), we include:
\begin{itemize}
    \item Total population by state
    \item Population under age 5 by state
    \item Total infant population (age 0-1) projected from ACS data
\end{itemize}

\subsubsection{Joint Committee on Taxation Tax Expenditures}

We calibrate to JCT's 2024 tax expenditure estimates by simulating the revenue effect of repealing each provision:
\begin{itemize}
    \item State and local tax (SALT) deduction: \$21.2B
    \item Medical expense deduction: \$11.4B  
    \item Charitable contribution deduction: \$65.3B
    \item Mortgage interest deduction: \$24.8B
\end{itemize}

For each deduction, we create a custom reform that neutralizes the provision, calculate the resulting income tax change at the household level, and target the aggregate revenue effect to match JCT estimates.

\subsubsection{Target Validation}

The loss matrix construction enforces several key validation checks:
\begin{itemize}
    \item No missing values in any target row
    \item No NaN values in the targets array
    \item Proper aggregation from tax unit to household level
    \item Consistent uprating factors applied across related targets
\end{itemize}

The resulting 7,000+ targets provide comprehensive coverage of income distributions, program participation, demographic patterns, and tax expenditure utilization, ensuring the enhanced dataset accurately reflects the complexity of the US tax and benefit system. The majority of targets come from IRS Statistics of Income data (over 5,300 targets), supplemented by state-level demographic and program participation data (over 1,700 targets).