Skip to contents

All functions

CPS
CPS
PENN
PENN
california_prop99
California proposition 99
coef(<synthdid>)
Extract coefficients from synthdid object
confint(<synthdid>)
Compute confidence intervals for synthdid object
did_estimate()
synthdid_estimate for diff-in-diff estimates. Takes all the same parameters, but by default, passes options to use the diff-in-diff estimator
estimate_dgp()
Estimates the DGP parameters used in the placebo studies in Sections 3 and 5 of the synthetic difference in differences paper. Described there in Section 3.1.1.
fitted(<synthdid>)
Extract fitted values from synthdid object
format(<synthdid_estimate>)
Format a synthdid object
model.frame(<synthdid>)
Model frame for synthdid
panel.matrices()
Convert a long (balanced) panel to a wide matrix
plot(<synthdid_estimate>)
Plot a synthdid object
predict(<synthdid>)
Predictions from synthdid object
print(<summary.synthdid_estimate>)
Print summary of synthdid object
print(<synthdid>)
Print method for synthdid objects
print(<synthdid_convergence>)
Print method for synthdid convergence info
print(<synthdid_estimate>)
Print a synthdid object
print(<synthdid_memory_estimate>)
Print method for synthdid memory estimate
random.low.rank()
Generate a synthetic low-rank panel for testing
residuals(<synthdid>)
Extract residuals from synthdid object
sc_estimate()
synthdid_estimate for synthetic control estimates. Takes all the same parameters, but by default, passes options to use the synthetic control estimator By default, this uses only 'infinitesimal' ridge regularization when estimating the weights.
simulate_dgp()
Simulates data from DGPs used in the placebo studies in Sections 3 and 5 of the synthetic difference in differences paper. Described there in Section 3.1.1.
sparsify_function()
A function mapping a numeric vector to a (presumably sparser) numeric vector of the same shape to be passed onto synthdid_estimate.
summary(<synthdid_estimate>)
Summarize a synthdid object
synthdid()
Synthetic Difference-in-Differences Estimation with Formula Interface
synthdid_controls()
Outputs a table of important synthetic controls and their corresponding weights, sorted by weight. The table is truncated to exclude synthetic controls that do not matter for any estimate — for each estimate, the truncated controls may have total weight no larger that 1-mass.
synthdid_converged()
Check convergence status of synthdid estimate
synthdid_convergence_info()
Get convergence diagnostics for synthdid estimate
synthdid_effect_curve()
Outputs the effect curve that was averaged to produce our estimate
synthdid_estimate()
Computes the synthetic diff-in-diff estimate for an average treatment effect on a treated block.
synthdid_memory_estimate()
Estimate memory requirements for synthdid computation
synthdid_placebo()
Computes a placebo variant of our estimator using pre-treatment data only
synthdid_placebo_plot()
For our estimator and a placebo, plots treated and synthetic control trajectories and overlays a 2x2 diff-in-diff diagram. Requires ggplot2
synthdid_plot()
Plots treated and synthetic control trajectories and overlays a 2x2 diff-in-diff diagram of our estimator. In this overlay, the treatment effect is indicated by an arrow. The weights lambda defining our synthetic pre-treatment time period are plotted below. If a list of estimates is passed, plots all of them. By default, does this in different facets. To overlay estimates in the same facet, indicate a facet for each estimator in the argument 'facet'.
synthdid_rmse_plot()
A diagnostic plot for sc.weight.fw.covariates. Plots the objective function, regularized RMSE, as a function of the number of Frank-Wolfe / Gradient steps taken. Requires ggplot2
synthdid_se()
Calculate the standard error of a synthetic diff in diff estimate. Deprecated. Use vcov.synthdid_estimate.
synthdid_units_plot()
Plots unit by unit difference-in-differences. Dot size indicates the weights omega_i used in the average that yields our treatment effect estimate. This estimate and endpoints of a 95% CI are plotted as horizontal lines. Requires ggplot2
timesteps()
Get timesteps from panel matrix Y
update(<synthdid>)
Update a synthdid model
vcov(<synthdid_estimate>)
Calculate Variance-Covariance Matrix for a Fitted Model Object