maxTestIU_func {EquiTrends}R Documentation

An internal function of the EquiTrends Maximum Equivalence Testing procedure using the Intersection Union approach.

Description

This is a supporting function of the maxEquivTest function. It calculates the placebo coefficients and the absolute value of the placebo coefficients. It then calculates the critical value and p-values if an equivalence threshold is supplied for the test, according to Dette & Schumann (2024). If no equivalence threshold is supplied, it calculates the minimum equivalence threshold for which the null of non-negligible pre-trend differences can be rejected.

Usage

maxTestIU_func(
  data,
  equiv_threshold,
  vcov,
  cluster,
  alpha,
  n,
  no_periods,
  base_period,
  is_panel_balanced
)

Arguments

data

The data.frame object containing the data for the test. Should be of the form what is returned by the EquiTrends_dataconstr function.

equiv_threshold

The equivalence threshold for the test. If NULL, the minimum equivalence threshold for which the null hypothesis of non-negligible can be rejected is calculated.

vcov

The variance-covariance matrix estimator. See maxEquivTest for more information.

cluster

The cluster variable for the cluster-robust variance-covariance matrix estimator. See maxEquivTest for more information.

alpha

The significance level for the test.

n

The number of cross-sectional individuals in the data.

no_periods

The number of periods in the data.

base_period

The base period for the test. Must be one of the unique periods in the data.

is_panel_balanced

A logical value indicating whether the panel data is balanced.

Value

An object of class "maxEquivTestIU" containing:

placebo_coefficients

A numeric vector of the estimated placebo coefficients,

abs_placebo_coefficients

a numeric vector with the absolute values of estimated placebo coefficients,

placebo_coefficient_se

a numeric vector with the standard errors of the placebo coefficients,

significance_level

the chosen significance level of the test,

num_individuals

the number of cross-sectional individuals (n),

num_periods

the number of periods (T),

num_observations

the total number of observations (N),

base_period

the base period in the data,

placebo_names

the names corresponding to the placebo coefficients,

equiv_threshold_specified

a logical value indicating whether an equivalence threshold was specified.

is_panel_balanced

a logical value indicating whether the panel data is balanced.

Additionally, if !(is.null(equiv_threshold))

if is.null(equiv_threshold)

References

Dette, H., & Schumann, M. (2024). "Testing for Equivalence of Pre-Trends in Difference-in-Differences Estimation." Journal of Business & Economic Statistics, 1–13. DOI: doi:10.1080/07350015.2024.2308121


[Package EquiTrends version 1.0.0 Index]