Interaction Effects, Logit vs LPM, and Endogeneity in a Retention Study
Statistics & ExperimentsModel answerLast updated
Model day-7 retention with a treatment-by-new-user interaction, interpret LPM and logit coefficients, pick diagnostics and standard errors, handle an endogenous regressor, and model counts.
A video app tested a new content-preloading feature. You have one row per user with these fields:
retained_7d: 1 if the user was active on day 7, otherwise 0treated: 1 if the user received the preloading featurenew_user: 1 for a brand-new user, 0 for an existing onewatch_time_day1: minutes watched on the first day- country fixed effects and signup-date fixed effects
You want to estimate the treatment effect on retention and check whether it differs between new and existing users, so the model includes the interaction treated × new_user.
(a) Specification and interpretation. Write out both a linear probability model (LPM) and a logistic regression. Interpret the coefficient on treated and on treated × new_user in each. For the logit, convert a coefficient into an odds ratio and then into an approximate marginal effect at the mean.
(b) Assumptions and diagnostics. Which problems would you look for: heteroskedasticity, separation, multicollinearity (for example VIF), misspecification (for example a link test), and poor calibration (for example reliability plots)? Which standard errors would you report, robust or clustered, and how would you justify the clustering level?
(c) Endogenous regressor. Suppose watch_time_day1 is endogenous, for instance because unobserved taste for the content drives both viewing and retention. Describe two remedies and their assumptions: (1) an instrumental-variable or control-function approach, and (2) a panel design with user fixed effects using within-user variation. What instruments or proxies might be plausible here?
(d) Count outcomes. You also have the number of videos watched per day. When would you prefer Poisson or negative binomial regression over OLS? How would you check for overdispersion, and how do you interpret exponentiated coefficients?
Hints
Hint 1
In the interaction model, the coefficient on the main effect alone describes only the reference group (new_user = 0). Add the interaction coefficient to get the other group's effect.
Hint 2
In a logit, the interaction coefficient is a ratio of odds ratios, and it does not equal the interaction effect on the probability scale. Compute the probability-scale effect as a difference of differences of predicted probabilities.
Hint 3
Ask whether watch_time_day1 is measured after treatment starts. If treatment changes it, it is a mediator, and adjusting for it changes what the treatment coefficient means. Also, with one row per user you cannot include user fixed effects without reshaping to a user-day panel.
Model answer
Hard Try it yourself first — then compare your approach, complexity and edge cases.
Overview
The question tests four skills: writing models precisely, reading coefficients on the right scale, choosing standard errors from the design, and spotting endogeneity, including a trap the prompt does not name. watch_time_day1 is probably affected by the treatment, so it is a post-treatment variable.
(a) Specification and interpretation
Let T = treated, N = new_user, W = watch_time_day1, with country effects α_c and signup-date effects δ_d.
LPM: P(Y=1 | X) = β₀ + β₁T + β₂N + β₃·T·N + β₄W + α_c + δ_d
Logit: log[p/(1−p)] = the same linear index.
LPM reading (percentage points):
- β₁ is the treatment effect for existing users (N=0). For example, 0.02 means +2 pp retention.
- β₁ + β₃ is the effect for new users.
- β₃ is the difference in effects (new minus existing). Its t-test is the test of heterogeneity.
Logit reading:
- exp(β₁) is the odds ratio for existing users. exp(β₁+β₃) is the odds ratio for new users. exp(β₃) is a ratio of odds ratios, so heterogeneity is multiplicative on the odds scale.
- For a continuous regressor, the marginal effect is β·p(1−p). For a binary T, use the discrete difference Λ(x̄β + β₁) − Λ(x̄β).
- Example: β₁ = 0.10 gives OR ≈ 1.105 (odds up about 10.5%). With baseline p = 0.40, the effect is about 0.10 × 0.4 × 0.6 ≈ +2.4 pp.
- For new users with p = 0.25 and β₁+β₃ = 0.30, OR ≈ 1.35 and the effect is about 0.30 × 0.25 × 0.75 ≈ +5.6 pp.
- Interaction caveat: on the probability scale the interaction is not β₃ and can even have a different sign. Compute the cross-difference [P(1,1) − P(0,1)] − [P(1,0) − P(0,0)]. Prefer average marginal effects over effects at the mean, because the "mean user" with averaged dummies and fixed effects does not exist. Use the delta method or a bootstrap for standard errors.
Bad-control warning. Preloading probably raises day-1 watch time, so W is a mediator. Conditioning on it makes β₁ a direct effect only and can introduce selection bias. For the total effect of the experiment, drop W or use only pre-treatment covariates (for example pre-period activity, as in CUPED).
(b) Assumptions and diagnostics
| Issue | Concern | Check or fix |
|---|---|---|
| Heteroskedasticity (LPM) | Var(Y|X) = p(1−p) is never constant | HC-robust SEs (HC1/HC3). Report the share of fitted values outside [0,1]. |
| Separation (logit) | Sparse country × date cells that are all 0 or all 1 make estimates diverge | Look for huge coefficients or SEs and convergence warnings. Pool sparse levels, drop perfectly predicted cells, or use Firth's penalized logit. |
| Multicollinearity | T, N and T·N are correlated, and W may correlate with N | VIF (generalized VIF for FE blocks) on non-FE terms. Interaction VIFs are often high but harmless. Centering N helps interpretation. High VIF means imprecision, not bias. |
| Misspecification | Wrong link or wrong shape in W | Link test (regress Y on ŷ and ŷ²; significant ŷ² signals trouble), RESET, residuals against W. W is skewed, so try log1p(W) or splines. |
| Calibration | Probability claims require trustworthy probabilities | Reliability plot by predicted-probability decile, calibration intercept and slope, Brier score, split by treated × new_user. AUC measures ranking only. |
Standard errors. Cluster at the level where treatment is assigned or where errors are correlated by design.
- User-level randomization with one row per user: HC-robust SEs suffice. Clustering by country would be needlessly conservative.
- Assignment by country, rollout wave or device cohort: cluster at that unit. With fewer than roughly 40 clusters, use a wild cluster bootstrap. Consider two-way clustering (country and signup date) if common daily shocks exist.
- Repeated rows per user: cluster by user at minimum.
Fixed effects remove level differences but not within-cluster error correlation.
(c) Endogenous watch time
Unobserved taste raises both W and retention, so β₄ is biased upward, and the bias can leak into T and N if they are correlated with W.
Remedy 1: IV / control function.
- First stage: W = πZ + Xγ + v. Second stage: logit of Y on T, N, T·N, W, the residual v̂ and the fixed effects. The coefficient on v̂ gives a Hausman-style endogeneity test. Bootstrap SEs because v̂ is generated. For the LPM, use ordinary 2SLS.
- Assumptions: relevance (strong first stage, effective F well above 10), exclusion (Z affects retention only through W), independence (Z as good as random), monotonicity for a LATE reading, and a correct model for how v enters (for example linearity or joint normality).
- Plausible instruments: randomized day-1 variation from another experiment (onboarding feed length, injected latency, day-1 notification randomization) is best, provided its effect does not persist beyond day 1. Regional network or CDN quality shocks on signup day are weaker because a bad first experience may directly hurt retention. Weather or holidays shift free time but may persist through the week. Do not use
treateditself, since preloading can affect retention through channels other than watch time. - Proxies (controls, not instruments): onboarding interest picks, acquisition channel, referral source, and prior activity in sibling apps.
Remedy 2: user fixed effects. One row per user rules this out, so reshape to a user-day panel: Y_it = α_i + βW_it + λ_t + ε_it, with Y_it an outcome such as being active the next day. The user effect α_i absorbs time-invariant taste. Assumptions: the confounder is time-invariant, strict exogeneity (no feedback from past outcomes into current W), and enough within-user variation in W. Cluster by user. Time-varying taste shocks and measurement error (which attenuates within-user estimates) remain concerns. Nonlinear FE logit suffers from the incidental-parameters problem, so conditional logit or an LPM is safer.
(d) Count outcomes
Videos watched per day is a non-negative integer, often skewed, with many zeros. OLS can predict negative values and handles the mean-variance relationship poorly, although it remains consistent for linear conditional means and is fine for large-mean counts with robust SEs. Poisson regression models E[y] = exp(Xβ) and is consistent for the mean as long as the mean is correctly specified, even if the variance is not (use robust SEs). Negative binomial adds a dispersion parameter and is better when variance exceeds the mean.
Overdispersion checks: Pearson χ²/df well above 1; a likelihood-ratio test of Poisson against negative binomial (boundary-adjusted); the Cameron–Trivedi auxiliary regression. For excess zeros, consider zero-inflated or hurdle models.
Interpretation: exp(β) is a rate ratio. If exp(β) = 1.08 for treated, expected daily videos are 8% higher, holding other variables fixed. For the interaction, exp(β₃) is the ratio of rate ratios between new and existing users. Include an exposure offset if observation windows differ in length.
Common mistakes
- Reading the main effect as an average effect when an interaction is present.
- Treating the logit interaction coefficient as a probability-scale effect.
- Controlling for a mediator and calling the result the total effect.
- Clustering by default without tying it to the assignment mechanism.
- Proposing user fixed effects on one-row-per-user data.