Skip to contents

Two one-sided tests (TOST) of whether the average effect of a randomized treatment on \(Z\), in standard-deviation units of \(Z\), lies inside \((-\delta, \delta)\). Rejecting both one-sided nulls supports the claim that any shift is smaller than the margin. If z_pre is supplied the effect is estimated by regression adjustment on the baseline measure, which sharpens the test. Standard errors are HC2 heteroskedasticity robust.

Usage

equivalence_shift(z, treat, z_pre = NULL, margin = 0.2, alpha = 0.05)

Arguments

z

Numeric vector measured after treatment.

treat

Binary treatment.

z_pre

Optional baseline measure of z.

margin

Equivalence margin \(\delta\) in standard deviations of z. Default 0.2. Choose it before seeing the data.

alpha

Significance level of each one-sided test. Default 0.05.

Value

A list of class "equivalence_shift" with the standardized estimate, its standard error, the \(1 - 2\alpha\) confidence interval, the TOST p-value, and the logical equivalent.

References

Hartman, E., & Hidalgo, F. D. (2018). An equivalence approach to balance and placebo tests. American Journal of Political Science, 62(4), 1000-1013.

See also

Examples

set.seed(1)
treat <- rep(0:1, each = 500)
z <- rnorm(1000)
equivalence_shift(z, treat, margin = 0.2)
#> 
#> Equivalence test (TOST) of the standardized shift in Z, margin +/- 0.20 SD
#>   Estimate = -0.066 SD, 90% CI [-0.170, 0.038], TOST p = 0.017
#>   Equivalence established.
#>