pte_default | R Documentation |
This is a generic/example wrapper for a call to the pte
function.
This function provides access to difference-in-differences and unconfoundedness based identification/estimation strategies given (i) panel data and (ii) staggered treatment adoption
pte_default(
yname,
gname,
tname,
idname,
data,
xformla = ~1,
d_outcome = FALSE,
d_covs_formula = ~-1,
lagged_outcome_cov = FALSE,
est_method = "dr",
anticipation = 0,
base_period = "varying",
control_group = "notyettreated",
weightsname = NULL,
cband = TRUE,
alp = 0.05,
boot_type = "multiplier",
biters = 100,
cl = 1
)
yname |
Name of outcome in |
gname |
Name of group in |
tname |
Name of time period in |
idname |
Name of id in |
data |
balanced panel data |
xformla |
one-sided formula for covariates used in the propensity score and outcome regression models |
d_outcome |
Whether or not to take the first difference of the outcome. The default is FALSE. To use difference-in-differences, set this to be TRUE. |
d_covs_formula |
A formula for time varying covariates to enter the first estimation step models. The default is not to include any, and, hence, to only include pre-treatment covariats. |
lagged_outcome_cov |
Whether to include the lagged outcome as a covariate. Default is FALSE. |
est_method |
Which type of estimation method to use. Default is "dr" for doubly robust. The other option is "reg" for regression adjustment. |
anticipation |
how many periods before the treatment actually takes place that it can have an effect on outcomes |
base_period |
The type of base period to use. This only affects the numeric value of results in pre-treatment periods. Results in post-treatment periods are not affected by this choice. The default is "varying", where the base period will "back up" to the immediately preceding period in pre-treatment periods. The other option is "universal" where the base period is fixed in pre-treatment periods to be the period right before the treatment starts. "Universal" is commonly used in difference-in-differences applications, but can be unnatural for other identification strategies. |
control_group |
Which group is used as the comparison group. The default choice is "notyettreated", but different estimation strategies can implement their own choices for the control group |
weightsname |
The name of the column that contains sampling weights. The defaul is NULL, in which case no sampling weights are used. |
cband |
whether or not to report a uniform (instead of pointwise) confidence band (default is TRUE) |
alp |
significance level; default is 0.05 |
boot_type |
should be one of "multiplier" (the default) or "empirical".
The multiplier bootstrap is generally much faster, but |
biters |
number of bootstrap iterations; default is 100 |
cl |
number of clusters to be used when bootstrapping; default is 1 |
pte_results
object
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.