EconometricsEconometrics Mini-Course

Dependent Variable with Many Zeros—Can You Just Run OLS? What Happens If You Drop the Zeros? What Is the Established Practice in Empirical Work?

You study \"the number of patents held by firms.\" In your sample of 10,000 firms, 7,000 have zero patents in every year—the dependent variable patent = 0. The remaining 3,000 have patent counts ranging from 1 to 5,000.

作者:Econometrics Research Navigation Station发布:2026-07-29★★

1. Introduction: 70% of Your Dependent Variable Is Zero—You Stare Silently at Stata

You study "the number of patents held by firms." In your sample of 10,000 firms, 7,000 have zero patents in every year—the dependent variable patent = 0. The remaining 3,000 have patent counts ranging from 1 to 5,000.

You casually think about running an OLS:

reg patent rnd size leverage age

But before hitting Enter, you hesitate—the dependent variable is a mass of zeros plus a right-skewed long tail. How will OLS handle all those observations piled up at zero?

You also consider: since most firms don't innovate, why not just study firms that do have patents—drop all observations where patent = 0?

But the difference between "firms that do not patent" and "firms that do patent"—is precisely the most central information in your research question. What drives the marginal change when a firm goes from "zero patents" to "starting to apply for patents"? If you drop all the zeros, you are effectively studying "among firms that already innovate, what determines the extent of innovation"—a question whose policy implications are completely different from studying "what drives firms from zero to first innovation."

Core message: A dependent variable with many zeros suggests the data-generating process may involve two distinct decisions—"whether to participate" (zero vs. positive) and "how much to participate" (the magnitude of the positive values). OLS lumps these together, assuming a single linear model can explain both decisions simultaneously—which is theoretically implausible and, in estimation, can lead to negative predicted values, severe heteroskedasticity, and marginal effects whose interpretation does not match reality. Directly dropping zeros shrinks your research question from "what affects Y" to "what affects the magnitude of Y conditional on Y > 0"—this is not just sample selection bias; it is a covert alteration of the research question itself. Established practices in the empirical literature include the Tobit model (assuming both decisions are driven by the same process), two-part models/Hurdle models (allowing the two decisions to be driven by different processes), the Heckman selection model, and—for count data (such as patent counts)—Poisson/negative binomial regression and their zero-inflated versions.


2. Why Is OLS Ill-Suited to Handling "A Mass of Zeros + A Long Tail"?

2.1 OLS's Linear Predictions Run Below Zero

Y=β0+β1X+εY = \beta_0 + \beta_1 X + \varepsilon

The fitted values Y^\hat{Y} from OLS trace out a straight line—which will inevitably cross zero at some value of X and enter negative territory. But your dependent variable (patents, R&D expenditure, export value) is by definition non-negative—negative values have no economic meaning.

Near zero, OLS will predict "negative patent counts"—which is not just an embarrassing output; it means your model gives wrong predictions precisely where accuracy matters most (the marginal effects near zero).

2.2 A Mass of Zeros Creates Extreme Non-Normality and Heteroskedasticity

When 70% of Y = 0 and the remaining Y values range from 1 to 5,000, the residual distribution has a huge spike at zero followed by a long, asymmetric right tail. This distribution is far from normal—OLS's normality assumption clearly fails.

More importantly, the variance of the errors is systematically related to X—for innovative firms (X at higher levels), Y can range from 0 to 5,000; for non-innovative firms (X at lower levels), Y is almost always 0. This is constructive heteroskedasticity—not a data problem per se, but inherent to the "mass of zeros + long tail" data structure.

Although, in large samples, violations of normality can be mitigated by the central limit theorem, negative predictions for Y and the nonlinearity of marginal effects cannot be resolved by adding more observations—these are structural problems of model specification, not inference problems.

2.3 The Economic Meaning of Marginal Effects Is Distorted

OLS assumes that a one-unit increase in X raises Y by β₁ units—regardless of the starting value of X. But for a variable like "patent count":

  • A firm with zero initial R&D investment that invests in R&D for the first time—it might go from zero patents to its first patent (a jump from 0 to 1).
  • A firm already investing heavily in R&D that continues to increase its investment—it might go from 50 patents to 55 (an incremental change from 50 to 55).

The economic meaning of these two "increases" is completely different—the former involves the extensive margin of "whether to innovate," the latter the intensive margin of "how much to innovate." OLS uses a single β₁ to summarize these two fundamentally different types of marginal effects—it averages the two but correctly reflects neither.


3. Dropping Zeros—Seemingly Clean, Actually Dangerous

3.1 You Changed Your Research Question—Rather Than "Handling a Data Problem"

Original research question: "What factors affect a firm's patent output?"

Question after dropping zeros: "Among firms that already have patents, what factors affect the number of patents?"

These two questions have completely different policy implications. If you are a policymaker wanting to know "whether R&D subsidies promote firm innovation," you need to know: whether subsidies can turn zero-patent firms into patent-holding firms (extensive margin), and whether subsidies can make patent-holding firms produce more patents (intensive margin). If subsidies work primarily through the extensive margin (pushing firms from zero to one), and you only study the intensive margin (firms with patents), you will draw the erroneous conclusion that "subsidies have little effect on innovation"—because you have dropped the primary channel through which subsidies work from your sample.

3.2 Sample Selection Bias—Dropping Is Not Random

Dropping observations with Y = 0 is not random sampling—you are systematically selecting a subsample. If the probability of entering the "Y > 0" subsample is correlated with your X (e.g., firms with high R&D investment are more likely to be in the patent-holding group), your OLS estimates within the subsample suffer from sample selection bias.

E[YX,Y>0]=Xβ+E[εX,Y>0]E[Y \mid X, Y > 0] = X\beta + E[\varepsilon \mid X, Y > 0]

If E[εX,Y>0]0E[\varepsilon \mid X, Y > 0] \neq 0 (which is almost certainly true—since "Y > 0" itself depends on ε), your OLS coefficients in the subsample are biased.

3.3 The Only Exception—Your Research Question Is Explicitly About the Y > 0 Population

If your research hypothesis is clearly stated from the outset as: "Among firms already engaged in exporting, what factors determine the volume of exports?"—then restricting the sample to firms with exports > 0 is defensible. But you must clearly recognize: your conclusions cannot be generalized to the question "what makes firms start exporting." Moreover, you still need to address sample selection—entry into the "exporting firm" subsample is not random.


4. Established Practices in the Empirical Literature—From One Equation to Two

4.1 The Tobit Model—One Equation Handling Both Zeros and Positives

The Tobit model (Tobin, 1958) is the classic model for "dependent variables censored at zero." It assumes a latent variable YY^* (such as "propensity to innovate"), and we observe Y=YY = Y^* only when Y>0Y^* > 0; when Y0Y^* \leq 0, we observe Y=0Y = 0.

Yi=Xiβ+εi,εiN(0,σ2)Y^*_i = X_i\beta + \varepsilon_i, \quad \varepsilon_i \sim N(0, \sigma^2) Yi=max(0,Yi)Y_i = \max(0, Y^*_i)

The intuition behind Tobit: Each firm has a "latent propensity to innovate" (YY^*)—which could be negative (meaning "very far from innovating"), zero, or positive. But we only observe its "non-negative part"—when the propensity is large enough, the firm exhibits actual patent output.

The core assumption of Tobit: The same X, through the same β, simultaneously determines "whether to go from zero to positive" and "the magnitude of the positive value." That is—the factors determining "whether to innovate" and those determining "how much to innovate" are identical, with the same direction and relative magnitude of effects. This assumption may be too strong in many contexts.

tobit y x1 x2, ll(0)    // ll(0) indicates left-censoring at 0

Marginal effects in Tobit: In Tobit, the marginal effect of X on Y can be decomposed into two parts—

E[YX]Xj=βjΦ(Xβσ)\frac{\partial E[Y \mid X]}{\partial X_j} = \beta_j \cdot \Phi\left(\frac{X\beta}{\sigma}\right)

  • Φ(Xβ/σ)\Phi(X\beta/\sigma) is the "probability that Y > 0."
  • The marginal effect = βj\beta_j × the probability of observing a positive value.
  • When the probability of observing a positive value is low (most observations are zero), the marginal effect is also small—consistent with intuition.

4.2 Two-Part Models / Hurdle Models—Two Equations, Two Decisions

Two-part models relax the core restriction of Tobit: they allow "whether to participate" and "how much to participate" to be driven by different processes.

First part (participation equation): A binary choice model (Probit/Logit)—what factors determine whether Y is greater than zero?

P(Yi>0Xi)=Φ(Xiγ)P(Y_i > 0 \mid X_i) = \Phi(X_i\gamma)

Second part (quantity equation): Conditional on Y > 0, what factors determine the magnitude of Y?

E[lnYiYi>0,Xi]=XiβE[\ln Y_i \mid Y_i > 0, X_i] = X_i\beta

Alternatively, a truncated normal, truncated Poisson, or generalized linear model can be used to estimate the parameters of the second part.

Advantage of two-part models: The same X can have one sign in the participation equation (e.g., "as firm size grows, it becomes more likely to start patenting") and a different sign—or even insignificance—in the quantity equation (e.g., "among firms already patenting, larger size does not necessarily mean more patents"). This is very common in real data—the determinants of "whether to export" and "how much to export" can be fundamentally different.

* First part: Probit
gen y_dummy = (y > 0)
probit y_dummy x1 x2
 
* Second part: Truncated regression or OLS on ln(y) for y > 0
tobit y x1 x2 if y > 0, ll(0)    // truncated Tobit
* or
reg ln_y x1 x2 if y > 0           // log-linear (simple but does not address selection)

Note: Simple OLS in the second part (reg ln_y x1 x2 if y > 0) does not address sample selection bias—it implicitly assumes that "entering the Y > 0 subsample" and "the magnitude of Y given entry" are independent processes. If these two processes share unobservable factors (e.g., "entrepreneurial spirit" affects both whether to innovate and how much to innovate), this OLS is biased.

4.3 The Heckman Selection Model—Handling Unobservable Selection

The Heckman selection model allows the two equations to share unobservable factors (through the correlation coefficient ρ).

Selection equation: si=Ziγ+uis_i^* = Z_i\gamma + u_i, Y is observed when si>0s_i^* > 0.

Outcome equation: Yi=Xiβ+εiY_i = X_i\beta + \varepsilon_i, observed only when si>0s_i^* > 0.

(ui,εi)N((00),(1ρσρσσ2))(u_i, \varepsilon_i) \sim N\left(\begin{pmatrix} 0 \\ 0 \end{pmatrix}, \begin{pmatrix} 1 & \rho\sigma \\ \rho\sigma & \sigma^2 \end{pmatrix}\right)

If ρ ≠ 0 → "whether Y is observed" and "the magnitude of Y" share unobservable factors → OLS in the subsample is biased. The Heckman model corrects this bias by estimating ρ and including the inverse Mills ratio.

heckman y x1 x2, select(y_dummy = x1 x2 z1) twostep

where z1 is an exclusion restriction variable—it affects "whether to participate" but does not directly affect "how much to participate." Finding a good exclusion restriction is the hardest step in applying the Heckman model empirically.

4.4 Count Models—When Y Is Count Data "0, 1, 2, 3, ..."

Patent counts, paper counts, accident counts—these are non-negative integer counts. OLS treats them as continuous variables (predicting 2.37 patents), while Poisson/negative binomial regression models them as counts.

Poisson regression:

E[YiXi]=exp(Xiβ)E[Y_i \mid X_i] = \exp(X_i\beta)

  • The exponential function ensures positive predictions.
  • Interpretation of βj\beta_j: a one-unit increase in Xⱼ multiplies the expected value of Y by eβje^{\beta_j} (i.e., a change of approximately 100×βj%100 \times \beta_j\%).
  • The core assumption of Poisson: variance = mean. But in patent data, the variance is typically much larger than the mean (overdispersion).

Negative binomial regression:

E[YiXi]=exp(Xiβ)E[Y_i \mid X_i] = \exp(X_i\beta) Var(YiXi)=μi+αμi2\text{Var}(Y_i \mid X_i) = \mu_i + \alpha \mu_i^2

  • The additional parameter α allows the variance to exceed the mean (overdispersion).
  • When α = 0, it reduces to Poisson.
  • Negative binomial regression is the empirical standard for patent count data.
poisson patent rnd size, robust
nbreg patent rnd size, robust

Zero-inflated models (Zero-Inflated Poisson/Negative Binomial): If there are too many zeros (more than Poisson or negative binomial can explain), there may be "structural zeros"—i.e., two different kinds of zeros: some firms "will never innovate" (structural zeros), while others "might innovate but happen not to have done so" (random zeros).

Zero-inflated models use two equations to model these two types of zeros separately—a Logit/Probit equation predicting "whether it is a structural zero," and a count equation predicting the count (including random zeros).

zip patent rnd size, inflate(rnd size)       // zero-inflated Poisson
zinb patent rnd size, inflate(rnd size)      // zero-inflated negative binomial

The Vuong test can be used to compare a zero-inflated model with its non-inflated counterpart—if p < 0.05, the zero-inflated model fits the data significantly better.

4.5 PPML (Poisson Pseudo-Maximum Likelihood)—Not Just for Counts

PPML (Poisson Pseudo Maximum Likelihood) has been widely recommended in recent empirical literature (especially for estimating gravity equations in international trade). Its core advantages are:

  • In the presence of heteroskedasticity, the Poisson estimator remains consistent—you do not need to assume variance = mean.
  • It handles zeros in the dependent variable—no special treatment of zeros is required.
  • The coefficients can be interpreted as semi-elasticities (similar to regressing ln(Y) on X), but without requiring Y > 0.
ppml y x1 x2           // ppml requires installation: ssc install ppmlhdfe
ppmlhdfe y x1 x2, absorb(fe1 fe2)   // supports high-dimensional fixed effects

PPML has almost replaced the "ln(trade + 1)" approach in the trade literature—because it honestly handles zero trade flows (no trade between two countries) without needing to add that +1.


5. ln(Y + 1)—A Common "Lazy Approach," and Why It Is Problematic

Faced with a dependent variable that is a mass of zeros plus a long tail, many people's first reaction is: why not just take the log? But ln(0) = −∞, so you can't. Hence some add 1:

ln(Y+1)\ln(Y + 1)

and then run OLS on ln(Y+1). This practice was once very common in the literature but has been increasingly criticized in recent years.

Problem one: The +1 is arbitrary. Why +1, not +0.1? Not +10? Different additive constants change the magnitude and even the significance of the coefficients. Choosing your favorite +X and reporting the results is a classic example of p-hacking.

Problem two: The coefficient on ln(Y+1) cannot be directly interpreted as a percentage change (unlike ln(Y)). When Y is small (e.g., Y = 0 or 1), the +1 accounts for a large proportion of Y—ln(0+1) = 0, ln(1+1) ≈ 0.693; this change is driven by the +1, not by a change in Y itself.

Problem three: In data with many zeros, ln(Y+1) creates an artificial pile-up at zero—this is not a natural feature of Y's distribution but an artifact of the +1 transformation.

Alternatives: If you want a model with an interpretation similar to ln(Y) but that can handle zeros—use PPML. If you want an elasticity interpretation—use the Poisson coefficients (which are already semi-elasticities). The only advantage of ln(Y+1) is simplicity—but in most standard empirical settings, "simplicity" should not be the primary reason for choice.


6. A Selection Framework—Which One Should You Use?

Your data characteristics Your research question Recommended method
Y continuous positive + many zeros Care about the overall effect of X on Y (without distinguishing extensive/intensive margins) Tobit
Y continuous positive + many zeros Care about whether extensive and intensive margins are driven by different processes Two-part model (Hurdle)
Y continuous positive + many zeros Suspect "whether Y > 0" and "the magnitude of Y" share unobservable factors Heckman selection model
Y is count (0, 1, 2, ...) Care about the semi-elasticity of X on Y Negative binomial (overdispersed) / Poisson (equidispersed)
Y is count + too many zeros Suspect "structural zeros" Zero-inflated negative binomial (ZINB)
Y is continuous/count + zeros Care about semi-elasticity interpretation, have fixed effects PPML (most widely applied, especially in trade gravity equations)
You have none of the above methods Need a quick benchmark OLS (only as a benchmark comparison, placed in robustness checks, not as the main regression)
You only care about the Y > 0 population Research hypothesis explicitly restricted to Y > 0 Subsample regression (but must discuss selection bias and conduct Heckman robustness checks)
You don't want to do anything Do not use ln(Y+1) + OLS

7. Common Misconceptions

7.1 Misconception One: Tobit Is "OLS That Handles Zeros"

Tobit is not a "zero-compatible version" of OLS—its assumptions are much stronger than OLS's (normality, homoskedasticity, a single β driving both extensive and intensive margins). When the data distribution deviates severely from normality and the variance varies with X, Tobit can perform worse than OLS—because it assumes not only linearity but also normality.

In practice, Tobit estimates are highly sensitive to the assumptions of normality and homoskedasticity. If you use Tobit, be sure to confirm in robustness checks that the qualitative direction of your core conclusions holds with other models (such as two-part models or PPML).

7.2 Misconception Two: Interpreting Poisson/Negative Binomial Coefficients Like OLS

The Poisson coefficient β^\hat{\beta} is not "a one-unit increase in X raises Y by β^\hat{\beta} units." The correct interpretation:

  • The expected value of Y changes by a multiplicative factor of eβ^e^{\hat{\beta}}. If β^=0.3\hat{\beta} = 0.3, e0.31.35e^{0.3} \approx 1.35 → a one-unit increase in X raises the expected value of Y by approximately 35%.
  • For small β^\hat{\beta} (< 0.1), β^×100%\hat{\beta} \times 100\% is a good approximation (semi-elasticity).

7.3 Misconception Three: Thinking "Adding Zero-Inflation Is Always Better"

Zero-inflated models are advantageous when the assumption of "two sources of zeros" is reasonable in your context. But if the structural source of zeros does not exist in your data (all zeros come from the same random process), a zero-inflated model is overfitting—it uses more parameters to fit unnecessary complexity.

Before doing zero-inflation, ask yourself: does my data contain "two different kinds of zeros" in an economic sense? For example, "firms that never export" (structural zeros) versus "firms that do not currently export but could" (random zeros)—if so, zero-inflation makes sense. If all zeros are "exporting firms that happened not to export this year"—zero-inflation is unnecessary.


8. Summary

Six core takeaways for dependent variables with many zeros:

  1. OLS faces three structural problems with data piled up at zero: predicted values can be negative, marginal effects cannot distinguish extensive from intensive margins, and heteroskedasticity and non-normality are inherent to the data structure rather than model misspecification.

  2. Directly dropping zeros = changing your research question. From "what affects Y" to "what affects the magnitude of Y conditional on Y > 0." Unless your research hypothesis was explicitly restricted to the latter from the outset, this is a covert alteration of the research question.

  3. Tobit is the most classic solution—but its assumptions are strong. The same β drives both "from zero to positive" and "the magnitude of the positive value." If your theory does not support this assumption, two-part models (Hurdle) allow different drivers.

  4. For count data (patents, papers, accidents)—negative binomial regression is the empirical standard. Poisson underestimates standard errors under overdispersion; negative binomial absorbs the extra dispersion through the α parameter.

  5. PPML is one of the most robust choices for handling "zeros + positives + heteroskedasticity." Especially in international trade and settings requiring high-dimensional fixed effects. It does not assume a distributional form and automatically handles zeros.

  6. Do not use ln(Y+1) + OLS. This practice was once popular, but today's reviewers will almost certainly question the arbitrariness of the +1. Use PPML or Poisson instead.


One-sentence conclusion:

"The mass of zeros in your dependent variable is not a flaw in your data—it is the data telling you: 'there is an important economic decision here: going from nothing to something.' OLS forcibly compresses 'nothing,' 'a little,' and 'a lot' onto a single straight line. Tobit says 'they are driven by the same process.' Two-part models say 'no—deciding whether to have it and deciding how much to have may be two different things.' Your theory should tell you which to choose—not your Stata menu."


9. Presentation Suggestions for Bilibili/WeChat Official Account

  • Bilibili video: Suggest using "from zero to one" as the narrative theme. Opening: a bar chart—70% of observations on the Y-axis piled at zero, the remaining 30% dragging a long right tail. Voiceover: "This is your dependent variable—70% of firms have no patents at all, and the rest range from 1 to 5,000. You feed this data to OLS—OLS draws a straight line that crosses into negative territory (predicting negative patent counts). You frown, drop all the zeros—and then you realize you've changed your research question from 'what makes firms innovate' to 'what makes already-innovating firms more productive'—these are two different questions with two different answers." Act One "Why OLS fails": three animations—negative predicted values (regression line crossing below the zero line, flashing red warning), one β unable to distinguish "from 0 to 1" from "from 50 to 55" (two jumps of different magnitudes but the same β), residual distribution with a huge spike at zero (non-normality + heteroskedasticity). Act Two "The cost of dropping zeros": half of the sample frame darkens and disappears (zeros dropped), a red stamp reading "research question altered" is slapped on the title. Act Three "Four established solutions": four cards unfold in sequence—Tobit ("one β, two margins"), two-part model ("two equations, two decisions"), negative binomial ("the expert on count data"), PPML ("the all-rounder handling zeros + heteroskedasticity + fixed effects"). Act Four "The trap of ln(Y+1)": a researcher opens a toolbox containing only one button labeled "+1." He presses it—the coefficients change, the significance changes. Next to it is a slider labeled "+0.1 ... +10," with different additive constants yielding different coefficients. Voiceover: "Don't add that 1—use PPML."
  • WeChat official account: For the three data structures with zero pile-up (continuous + zeros, count + zeros, count + excess zeros), suggest including a distribution histogram for each. Turn the selection framework table (seven scenarios × research question × recommended method) into the core infographic. Present the progression from Tobit → two-part model → Heckman (from "one equation" to "two related equations" to "two equations sharing unobservable factors") as an evolutionary roadmap. Present the problems with ln(Y+1) (three problems + why PPML is the alternative) as a "common lazy practice vs. correct alternative" two-column comparison card. Turn the Stata command quick reference (tobit / heckman / nbreg / zinb / ppmlhdfe) into code cards.
  • Recommended titles:
    • Main title: 《Dependent Variable with Many Zeros—Can You Still Run OLS? What Happens If You Drop the Zeros? What Is the Right Approach?》
    • Alternative title: 《70% of Y Is Zero—Tobit, Two-Part Models, Negative Binomial, or PPML?》
    • New media title: 《Dropping All Zero-Valued Observations—You Think You're Cleaning Data, but You're Actually Changing Your Research Question》
  • Key quotes:

    "The mass of zeros in your dependent variable isn't causing trouble—it's telling you that there is an important economic decision here: going from nothing to something. OLS produces negative predictions below zero because you're asking it to explain a decision it shouldn't be explaining. Dropping the zeros is equivalent to erasing this decision from your sample—your conclusions are no longer about 'what makes people innovate,' but 'what makes those already innovating more productive.'"

    "Tobit says: 'whether to innovate' and 'how much to innovate' are the same decision process; the same X determines both. Two-part models say: 'no—deciding whether to have it and deciding how much to have may be two different things.' Your theory should tell you who is right—not your Stata output."

    "ln(Y+1) + OLS is a temptation—simple, fast, and reviewers used to accept it. But that +1 is arbitrary—why not add 0.1? Why not add 10? Different +X values give you different significance levels and different stories—it's a knob in your hand, not a truth in your data."

    "PPML is the most robust weapon for handling zeros + heteroskedasticity + fixed effects. It doesn't add anything to your dependent variable—it simply estimates your parameters in a way that never produces negative predictions. Your zeros stay zeros, and your positives stay positives."