PanelEstimate: PanelEstimate

View source: R/PanelEstimate.R

PanelEstimateR Documentation

PanelEstimate

Description

PanelEstimate estimates a causal quantity of interest, including the average treatment effect for treated or control units (att and atc, respectively), or average treatment effect (ate), as specified in PanelMatch. This is done by estimating the counterfactual outcomes for each treated unit using matched sets. Users will provide matched sets that were obtained by the PanelMatch function and obtain point estimates via a weighted average computation with weighted bootstrap standard errors. Point estimates and standard errors will be produced for each period in the lead window specified by the lead argument from PanelMatch. Users may run multiple estimations by providing lists of each argument to the function. However, in this format, every argument must be explicitly specified in each configuration and must adhere to the same data types/structures outlined below. See the included code examples for more about how this functionality works.

Usage

PanelEstimate(
  sets,
  number.iterations = 1000,
  df.adjustment = FALSE,
  confidence.level = 0.95,
  moderator = NULL,
  data
)

Arguments

sets

A PanelMatch object attained via the PanelMatch function.

number.iterations

An integer value indicating the number of bootstrap iterations. The default is 1000.

df.adjustment

A logical value indicating whether or not a degree-of-freedom adjustment should be performed for the standard error calculation. The default is FALSE.

confidence.level

A numerical value specifying the confidence level and range of interval estimates for statistical inference. The default is .95.

moderator

The name of a moderating variable, provided as a character string. If a moderating variable is provided the returned object will be a list of PanelEstimate objects. The names of the list will reflect the different values of the moderating variable. More specifically, the moderating variable values will be converted to syntactically proper names using make.names.

data

The same time series cross sectional data set provided to the PanelMatch function used to produce the matched sets

Value

PanelEstimate returns a list of class ‘PanelEstimate’ containing the following components:

estimates

the point estimates of the quantity of interest for the lead periods specified

bootstrapped.estimates

the bootstrapped point estimate values

bootstrap.iterations

the number of iterations used in bootstrapping

method

refinement method used to create the matched sets from which the estimates were calculated

lag

See PanelMatch argument lag for more information.

lead

The lead window sequence for which PanelEstimate is producing point estimates and standard errors.

confidence.level

the confidence level

qoi

the quantity of interest

matched.sets

the refined matched sets used to produce the estimations

standard.error

the standard error(s) of the point estimates

Author(s)

In Song Kim <insong@mit.edu>, Erik Wang <haixiao@Princeton.edu>, Adam Rauh <amrauh@umich.edu>, and Kosuke Imai <imai@harvard.edu>

References

Imai, Kosuke, In Song Kim, and Erik Wang (2018)

Examples

PM.results <- PanelMatch(lag = 4, time.id = "year", unit.id = "wbcode2", 
                         treatment = "dem", refinement.method = "mahalanobis", 
                         data = dem, match.missing = TRUE, 
                         covs.formula = ~ I(lag(tradewb, 1:4)) + I(lag(y, 1:4)), 
                         size.match = 5, qoi = "att",
                         outcome.var = "y", lead = 0:4, forbid.treatment.reversal = TRUE)
PE.results <- PanelEstimate(sets = PM.results, data = dem, number.iterations = 100)




insongkim/PanelMatch documentation built on June 10, 2022, 8 p.m.