CLP
Curvilinear local projections
Estimate quadratic response profiles at each horizon. Compare their curvature, test their shape, and report turning points with uncertainty intervals.
Version 1.2.0Stata 16+MIT licensenet install clp, from("https://clp-stata.pages.dev") replace
help clpInstall directly from this project. No account is required.
Fit each horizon
Use within least squares or Poisson pseudo-maximum likelihood with absorbed fixed effects. Estimate annual outcomes or outcomes accumulated through each horizon.
Evaluate response shape
Report endpoint slopes and the Sasabuchi–Lind–Mehlum intersection-union test for a U or inverted-U shape over the specified support.
Locate the turning point
Report the stationary point, its delta-method Wald interval and Fieller confidence set. Retain all horizon-specific statistics in r(table).
Use with a panel dataset
Declare the panel and time variables, then provide an outcome, an intensity variable and any controls. The names below are placeholders for variables in your dataset.
xtset firm year
clp outcome intensity x, horizons(0/4) ///
absorb(firm year) estimator(linear) ///
vce(cluster firm) support(0 1)Use transform(asinh) or transform(log) for transformed linear outcomes, and cumulative for accumulated outcomes. See the help file for complete syntax.
Requirements
Stata 16 or later. The default PPML estimator requires ppmlhdfe, reghdfe and ftools. Linear estimation uses built-in xtreg, fe for the documented panel-and-time specification, and reghdfe for other absorbed effects.
Try a simulated example
The included example generates its own data. Save your current data before running it.
net get clp, from("https://clp-stata.pages.dev") replace
do clp_example.doVerify your installation
The included self-test uses deterministic simulated data and known numerical reference values. It checks estimation, saved results, graphs and Fieller boundary cases. Save your data before running it; the script starts a clean session.
net get clp, from("https://clp-stata.pages.dev") replace
do clp_selftest.doThe development tests passed 11 integration groups and 34 numerical assertions in Stata 19.5. Read the 1.2.0 release notes for the corrected cases.
Files and documentation
This distribution contains the command and a simulated example. Research datasets and manuscript files are not included.