computeConditionalCS_DeltaSDM {HonestDiD}R Documentation

Computes conditional and hybridized confidence set for \Delta = \Delta^{SDM}(M).

Description

Computes the conditional confidence set and hybridized confidence set for \Delta = \Delta^{SDM}(M). The set \Delta^{SDB}(M) adds an additional shape restriction to \Delta^{SD}(M) that restricts the underlying trend to be monotone. It may either be increasing (\delta_t \ge \delta_{t-1}) or decreasing (\delta_t \le \delta_{t-1}).

Usage

computeConditionalCS_DeltaSDM(betahat, sigma, numPrePeriods, numPostPeriods,
                              M = 0, l_vec = .basisVector(index = 1, size=numPostPeriods),
                              alpha = 0.05, monotonicityDirection = "increasing",
                              hybrid_flag = "FLCI", hybrid_kappa = alpha/10,
                              returnLength = FALSE, postPeriodMomentsOnly = TRUE,
                              gridPoints = 10^3, grid.lb = NA, grid.ub = NA, seed = 0)

Arguments

betahat

Vector of estimated event study coefficients.

sigma

Covariance matrix of event study coefficients.

numPrePeriods

Number of pre-periods.

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)

M

Tuning parameter for \Delta^{SD}(M) that governs the degree of non-linearity allowed in the violation of parallel trends. Default equals 0

alpha

Desired size 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, "FLCI" specifies the conditional FLCI confidence set and "LF" specifies the conditional least-favorable confidence set. Default equals "FLCI".

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 TRUE, function only returns the length of the robust confidence. If FALSE, function returns dataframe that contains a grid of possible parameter values and a vector of zeros and ones associated with each value in the grid (one denotes that the grid value lies in the confidence set and zero denotes that the grid value does not fall within the confidence set.) Default equals FALSE.

monotonicityDirection

Specifies direction of monotonicity restriction. If "increasing", underlying trend specified to be increasing, \delta_t \ge \delta_{t-1}. If "decreasing", underlying trend specified to be decreasing \delta_t \le \delta_{t-1}. Default equals "increasing."

postPeriodMomentsOnly

Logical value. If TRUE, function excludes moments for \Delta^{SD}(M) that only include pre-period coefficients. Default equals TRUE.

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 NA and sets grid upper bound to equal the upper bound of the identified set under parallel trends plus 20*standard deviation of the point estimate, l_vec'betahat.

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 NA sets grid lower bound to equal the lower bound of the identified set under parallel trends minus 20*standard deviation of the point estimate, l_vec'betahat.

seed

Random seed for internal computations; included for reproducibility.

Value

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.

Author(s)

Ashesh Rambachan

References

Rambachan, Ashesh and Jonathan Roth. "An Honest Approach to Parallel Trends." 2021.


[Package HonestDiD version 0.2.6 Index]