This is a supporting function of the rmsEquivTest function. It calculates the placebo coefficients and the RMS of the placebo coefficients. It then calculates the critical value for the test and checks whether the null hypothesis can be rejected, according to Dette & Schumann (2024).
rmsTest_func(
data,
equiv_threshold,
alpha,
no_lambda,
base_period,
no_periods,
is_panel_balanced
)An object of class "rmsEquivTest" containing:
placebo_coefficientsA numeric vector of the estimated placebo coefficients,
rms_placebo_coefsthe root mean squared value of the placebo coefficients,
significance_levelthe significance level of the test,
num_individualsthe number of cross-sectional individuals in the data (n),
num_periodsthe number of pre-treatment periods in the data (T),
num_observationsthe number of observations in the data (N),
base_periodthe base period in the data,
equiv_threshold_specifieda logical value indicating whether an equivalence threshold was specified.
is_panel_balanceda logical value indicating whether the panel data is balanced.
If is.null(equiv_threshold), then additionally minimum_equiv_threshold: the minimum equivalence threshold for which the null hypothesis of non-negligible (based on the equivalence threshold) trend-differnces can be rejected.
if !(is.null(equiv_threshold)), then additionally
rms_critical_value: the critical value at the alpha level,
reject_null_hypothesis: A logical value indicating whether to reject the null hypothesis,
equiv_threshold: the equivalence threshold specified.
The data.frame object containing the data for the test. Should be of the form what is returned by the EquiTrends_dataconstr function.
The equivalence threshold for the test. If NULL, the minimum equivalence threshold for which the null hypothesis can be rejected is calculated.
The significance level for the test. Must be one of 0.01, 0.025, 0.05, 0.1 or 0.2.
See rmsEquivTest.
The base period for the test. Must be one of the unique periods in the data.
The number of periods in the data.
A logical value indicating whether the panel data is balanced.
Dette, H., & Schumann, M. (2024). "Testing for Equivalence of Pre-Trends in Difference-in-Differences Estimation." Journal of Business & Economic Statistics, 1–13. DOI: tools:::Rd_expr_doi("10.1080/07350015.2024.2308121")