did | R Documentation |
did
calculates difference-in-difference estimators based on SCM.
did(
x,
what,
range.pre,
range.post,
alternative = c("two.sided", "less", "greater"),
exclude.ratio = Inf
)
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: |
did
calculates difference-in-difference estimators with corresponding
p-values (if results of a placebo study are present) based on the Synthetic
Control Method.
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.
## Not run:
## for an example, see the main package vignette:
vignette("WorkingWithMSCMT",package="MSCMT")
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.