View source: R/matched_set_helpers.r
get.matchedsets | R Documentation |
get.matchedsets
is used to identify matched sets for a given unit with a specified i, t.
get.matchedsets(
t,
id,
data,
L,
t.column,
id.column,
treatedvar,
hasbeensorted = FALSE,
match.on.missingness = TRUE,
matching = TRUE,
qoi.in,
restrict.control.period = NULL
)
t |
integer vector specifying the times of treated units for which matched sets should be found. This vector should be the same length as the following |
id |
integer vector specifying the unit ids of treated units for which matched sets should be found. note that both |
data |
data frame containing the data to be used for finding matched sets. |
L |
An integer value indicating the length of treatment history to be matched |
t.column |
Character string that identifies the name of the column in |
id.column |
Character string that identifies the name of the column in |
treatedvar |
Character string that identifies the name of the column in |
hasbeensorted |
variable that only has internal usage for optimization purposes. There should be no need for a user to toggle this |
match.on.missingness |
TRUE/FALSE indicating whether or not the user wants to "match on missingness." That is, should units with NAs in their treatment history windows be matched with control units that have NA's in corresponding places? |
matching |
logical indicating whether or not the treatment history should be used for matching. This should almost always be set to TRUE, except for specific situations where the user is interested in particular diagnostic questions. |
get.matchedsets
returns a "matched set" object, which primarily contains a named list of vectors. Each vector is a "matched set" containing the unit ids included in a matched set. The list names will indicate an i,t pair (formatted as "<i variable>.<t variable>") to which the vector/matched set corresponds.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.