computeConditionalCS_DeltaSDRMB | R Documentation |
\Delta = \Delta^{SDRMB}(Mbar)
.
Computes the conditional confidence set and hybridized confidence set for \Delta = \Delta^{SDRMB}(Mbar)
. The set \Delta^{SDRMB}(Mbar)
adds an additional sign restriction to \Delta^{SDRM}(Mbar)
that restricts the sign of the bias to be either positive (\delta \ge 0
) or negative (\delta \le 0
).
computeConditionalCS_DeltaSDRMB(betahat, sigma, numPrePeriods, numPostPeriods,
l_vec = .basisVector(index = 1, size = numPostPeriods),
Mbar = 0, alpha = 0.05, hybrid_flag = "LF",
hybrid_kappa = alpha/10, returnLength = FALSE,
postPeriodMomentsOnly = TRUE, biasDirection = "positive",
gridPoints=10^3, grid.ub = NA, grid.lb = NA, seed = 0)
betahat |
Vector of estimated event study coefficients. |
sigma |
Covariance matrix of event study coefficients. |
numPrePeriods |
Number of pre-periods. For this function, |
numPostPeriods |
Number of post-periods. |
l_vec |
Vector of length numPostPeriods that describes the scalar parameter of interest, theta = l_vec'tau. Default equals to first basis vector, (1, 0, ..., 0) |
Mbar |
Tuning parameter Mbar for |
alpha |
Desired level of the confidence set. Default equals 0.05 (corresponding to 95% confidence interval) |
hybrid_flag |
Flag for whether user wishes to compute a hybridized confidence set. "ARP" specifies the conditional confidence set "LF" specifies the conditional least-favorable confidence set. The conditional FLCI hybrid confidence set is not available for |
hybrid_kappa |
Desired first-stage size of hybridized confidence set. Only specify this value if the user wishes to compute a hybridized confidence set. Default equals alpha/10. If user specifies hybrid_flag = "ARP", set this value to NULL. |
returnLength |
Logical value. If |
biasDirection |
Specifies direction of bias restriction. If "positive", bias is restricted to be positive, |
postPeriodMomentsOnly |
Logical value. If |
gridPoints |
Number of grid points used in test inversion step. Default equals 1000. |
grid.ub |
Upper bound of grid for test inversion. The user should only specify this if she wishes to manually specify the upper bound of the grid. Default equals |
grid.lb |
Lower bound of grid for test inversion. The user should only specify this if she wishes to manually specify the upper bound of the grid. Default equals |
seed |
Random seed for internal computations; included for reproducibility. |
The choice \Delta^{SDRMB}
adds an additional sign restriction to \Delta^{SDRM}(Mbar)
that restricts the sign of the bias to be either positive (\delta \ge 0
) or negative (\delta \le 0
). For this choice \Delta^{SDRMB}
, numPrePeriods
must be greater than one. As discussed in Section 2.3.2 of Rambachan & Roth (2021), \Delta^{SDRM}
uses observed non-linearities in the pre-treatment difference in trends to bound the possible non-linearities in the post-treatment difference in trends. This is only possible if there are multiple pre-treatment periods (i.e., numPrePeriods
> 1).
If returnLength equals TRUE
, function returns a scalar that equals the length of the confidence interval. If returnLength equals FALSE
, function returns a dataframe with columns
grid |
Vector of grid values used to construct the confidence interval by test inversion. |
accept |
Vector of zeros-ones associated with grid values, where one denotes a grid value that falls within the confidence interval and zero denotes a grid value that falls outside the confidence interval. |
Ashesh Rambachan
Rambachan, Ashesh and Jonathan Roth. "An Honest Approach to Parallel Trends." 2021.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.