xsdid_estimate | R Documentation |
Calls adjust.outcome.for.y, panel.matrices and then synthdid_estimate. Has similar syntax to xsdid_se_bootstrap.
xsdid_estimate( panel, unit = 1, time = 2, outcome = 3, treatment = 4, x, x.rows = NULL )
panel |
A data frame with columns consisting of units, time, outcome, and treatment indicator. It should be a balanced panel and not contain any NA. |
unit |
The column number/name corresponding to the unit identifier. Default is 1. |
time |
The column number/name corresponding to the time identifier. Default is 2. |
outcome |
The column number/name corresponding to the outcome identifier. Default is 3. |
treatment |
The column number/name corresponding to the treatment status. Default is 4. |
x |
The column numbers/names of all additional control variables |
x.rows |
To estimate the effect of x on y, we use by default all rows in which no treatment takes places. The argument x.rows allows to specify these rows manually. E.g. you could only take all rows before the first treatment starts (i.e. compared to the default exclude the rows of the control group during the treatment period). |
The resulting object from the call to synthdid_estimate.
## Not run: dat = xsdid.mc(N=20, T=20,return.data = TRUE) xsdid_estimate(dat, unit="i",time = "t",outcome = "y",treatment = "treat_exp",x = "x") xsdid_se_bootstrap(dat, unit="i",time = "t",outcome = "y",treatment = "treat_exp",x = "x", B=100)$se ## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.