View source: R/undid_stage_three.r
undid_stage_three | R Documentation |
Takes in all of the filled diff df CSV files and uses them to compute group level ATTs as well as the aggregate ATT and its standard errors and p-values.
undid_stage_three(
dir_path,
agg = "silo",
weights = TRUE,
covariates = FALSE,
interpolation = FALSE,
save_csv = FALSE,
filename = "UNDID_results.csv",
filepath = tempdir(),
nperm = 1001,
verbose = TRUE
)
dir_path |
A character specifying the filepath to the folder containing all of the filled diff df CSV files. |
agg |
A character which specifies the aggregation methodology for
computing the aggregate ATT in the case of staggered adoption.
Options are: |
weights |
A logical value (either |
covariates |
A logical value (either |
interpolation |
A logical value or a character which specifies which,
if any, method of interpolation/extrapolation for missing values of
|
save_csv |
A logical value, either |
filename |
A string filename for the created CSV file.
Defaults to |
filepath |
Filepath to save the CSV file. Defaults to |
nperm |
Number of random permutations of gvar & silo pairs to consider
when calculating the randomization inference p-value. Defaults to |
verbose |
A logical value (either |
The agg
parameter specifies the aggregation method used in the
case of staggered adoption. By default it is set to "silo"
so that the ATTs
are aggregated across silos with each silo having equal weight, but can be
set to "gt"
or "g"
instead. Aggregating across "g"
calculates ATTs for
groups based on when the treatment time was, with each "g"
group having
equal weight. Aggregating across "gt"
calculates ATTs for groups based on
when the treatment time was and the time for which the ATT is calculated.
The agg
parameter is ignored in the case of a common treatment time and
only takes effect in the case of staggered adoption. For common adoption,
refer to the weights
parameter.
A data frame containing the aggregate ATT and its
standard errors and p-values from two-sided tests of agg_ATT
== 0.
Also returns group (silo, g, or gt) level ATTs for staggered adoption.
# Execute `undid_stage_three()`
dir <- system.file("extdata/staggered", package = "undidR")
undid_stage_three(dir, agg = "g", nperm = 501, verbose = FALSE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.