View source: R/subset_functions.R
two_by_two_subset | R Documentation |
A function for computing a 2x2 subset of original data. This is the subset with post treatment periods separately for the treated group and comparison group and pre-treatment periods in the period immediately before the treated group became treated.
two_by_two_subset(
data,
g,
tp,
control_group = "notyettreated",
anticipation = 0,
base_period = "varying",
...
)
data |
the full dataset |
g |
the current group |
tp |
the current time period |
control_group |
whether to use "notyettreated" (default) or "nevertreated" |
... |
extra arguments to get the subset correct |
list that contains correct subset of data, n1
number of observations
in this subset, and disidx
a vector of the correct ids for this
subset.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.