did {MSCMT} | R Documentation |
Difference-in-difference estimator based on SCM
Description
did
calculates difference-in-difference estimators based on SCM.
Usage
did(
x,
what,
range.pre,
range.post,
alternative = c("two.sided", "less", "greater"),
exclude.ratio = Inf
)
Arguments
x |
An object of class |
what |
A character vector. Name of the variable to be considered. If missing, the (first) dependent variable will be used. |
range.pre |
A vector of length 2 defining the range of the pre-treatment period with start and end time given as
corresponding to the format of the respective column of the |
range.post |
A vector of length 2 defining the range of the post-treatment period with start and end time given as
corresponding to the format of the respective column of the |
alternative |
A character string giving the alternative of the test.
Either |
exclude.ratio |
A numerical scalar (default: |
Details
did
calculates difference-in-difference estimators with corresponding
p-values (if results of a placebo study are present) based on the Synthetic
Control Method.
Value
A list with components effect.size
, average.pre
and
average.post
. If x
contains the results of a placebo study,
three components p.value
, rank
, and excluded
(with the
names of the excluded units) are included additionally.
Examples
## Not run:
## for an example, see the main package vignette:
vignette("WorkingWithMSCMT",package="MSCMT")
## End(Not run)