# 1. Two groups of 61 and 113 sharing a five-group pooled error term
# (so df_error = 404 - 5 = 399), bounds of 5 raw-scale points:
# the design's probability of declaring equivalence when the
# groups are truly identical.
power_equivalence_c(c_weights = c(1, -1), n = c(61, 113),
sigma = 15.67, delta_upper = 5,
true_psi = 0, df_error = 399)
# 2. The same design's noninferiority power at the same point.
power_equivalence_c(c_weights = c(1, -1), n = c(61, 113),
sigma = 15.67, delta_upper = 5,
true_psi = 0, df_error = 399,
side = "noninferiority")
# 3. Agreement with power_equivalence_md() in the two-group case
# (Phillips, 1990, Table 1: expected 0.8029678).
power_equivalence_c(c_weights = c(1, -1), n = 24, sigma = 0.20,
delta_lower = 0.2, delta_upper = 0.2,
true_psi = 0.05, df_error = 22)
Run the code above in your browser using DataLab