← Back to projects
In Progress

Federal Set-Aside Effectiveness Analysis

Pythonstatsmodels scikit-learnUSASpending API Logistic Regression
Status: Pipeline built and documented; analysis in progress. This page describes the design and the reasoning behind it. Results will be added once the full data pull and model fitting are complete.

Problem

Federal small business set-aside programs reserve designated contract actions for small and disadvantaged firms. They represent a substantial policy commitment, and the reasonable question to ask is whether they work — and if so, where they work better or worse.

The research question this project settled on: conditional on a contract being awarded, how much does a set-aside designation shift the probability that a small business receives it, and does that association vary across agencies and industries?

Process — including the framing that didn't survive

My first design was different, and I think the reason it failed is the most useful thing in this project.

The original plan was a model predicting contract award likelihood by vendor — which firms win, given size, location, and prior award history. It's an intuitive framing and it maps cleanly onto how people talk about procurement competition.

It's also not identifiable with this data. USASpending records awards that were made. It does not record bids that were lost. There's no record of who competed for a given solicitation and didn't win. Every row in the dataset is a winner, which means a win/loss classifier has no negative class to learn from.

The standard workaround — sampling non-winners from the pool of registered vendors — invents a counterfactual that doesn't correspond to anything real. Most registered vendors never bid on most solicitations. Treating them as losers conflates did not win with did not compete, and the resulting model mostly learns which firms are large and active, which wasn't the question.

What makes this a trap rather than an obvious error is that such a model still posts a respectable AUC. It looks like it works. I'd rather find that out at the design stage than defend it in a review.

The set-aside framing avoids the problem entirely. The outcome — did a small business receive this award — is fully observed on every awarded action. The predictor of interest, set-aside designation, sits on the same record. No counterfactual construction required.

The pipeline. Paginated extraction from the USASpending API with retry handling. A data audit step before any modeling, because the missingness pattern here is load-bearing: most contract actions carry no set-aside designation, which appears as a null but is actually the comparison group. Dropping those rows would delete the control group and guarantee a meaningless result — they're recoded explicitly.

The model. Logistic regression fit twice, deliberately: statsmodels for interpretable coefficients and confidence intervals, scikit-learn for held-out predictive evaluation via AUC and Brier score. These answer different questions, and reporting only one would be incomplete. Four robustness specifications follow, because a single fit is a hypothesis rather than a finding.

What the design cannot support

Causal claims. Set-asides aren't randomly assigned. Contracting officers choose which actions to set aside, and that choice plausibly correlates with whether a small business could perform the work anyway. That selection inflates the observed association by an unknown amount. Credible causal identification would need exogenous variation — a size-standard discontinuity, a policy change with staggered timing — and this design has none. Every estimate is a conditional association, stated as such.

Discrimination claims. A gap in small business award share across agencies isn't evidence of disparate treatment. Agencies buy different things; industry composition, contract size, and capability requirements all vary. Nothing here isolates that.

Full-universe claims. The API pull is paginated and sorted by award amount, so it over-represents large actions unless the full population is retrieved.

Why the limitations section is this long. Because it's the part of the project I think is worth reading. The methodology document in the repo goes further — it exists so someone evaluating this work can check my reasoning rather than take the output on faith.