Learn R Programming

DMAR (version 1.0.0)

power_density_equivalence_md: Density Underlying the TOST Power Calculation

Description

Evaluates the integrand whose integral over \((0, \mathrm{upper})\) yields the power of the Schuirmann (1987) two one-sided tests procedure; see power_equivalence_md. Useful for plotting the integrand and for diagnostic work.

Usage

power_density_equivalence_md(
  power_sigma,
  alpha_level,
  theta1,
  theta2,
  diff,
  sigma,
  n,
  nu
)

Value

A data.frame with one row per supplied

power_sigma, and columns power_sigma and

power_density.

Arguments

power_sigma

Numeric vector of \(\sigma\) values at which to evaluate the integrand.

alpha_level

Type I error rate for each of the two one-sided tests.

theta1

Lower limit of the equivalence interval on the appropriate scale (regular or log).

theta2

Upper limit of the equivalence interval on the appropriate scale (regular or log).

diff

True difference in treatment means (ratio on the log scale) on the appropriate scale.

sigma

\(\sqrt{\mathrm{error\ variance}}\).

n

Number of subjects per treatment.

nu

Degrees of freedom for sigma.

Author

Ken Kelley [email protected]

References

Kelley, K. (2007a). Confidence intervals for standardized effect sizes: Theory, application, and implementation. Journal of Statistical Software, 20(8), 1--24. tools:::Rd_expr_doi("10.18637/jss.v020.i08")

Kelley, K. (2007b). Methods for the behavioral, educational, and social sciences: An R package. Behavior Research Methods, 39(4), 979--984. tools:::Rd_expr_doi("10.3758/BF03192993")

Phillips, K. F. (1990). Power of the two one-sided tests procedure in bioequivalence. Journal of Pharmacokinetics and Biopharmaceutics, 18(2), 139--144. tools:::Rd_expr_doi("10.1007/BF01063556")

Schuirmann, D. J. (1987). A comparison of the two one-sided tests procedure and the power approach for assessing the equivalence of average bioavailability. Journal of Pharmacokinetics and Biopharmaceutics, 15(6), 657--680.

See Also

power_equivalence_md, power_equivalence_md_plot

Other equivalence testing: equivalence_c(), equivalence_r(), equivalence_smd(), plot_equivalence(), power_equivalence_c(), power_equivalence_md(), power_equivalence_md_plot(), ss_power_equivalence_c()

Examples

Run this code
# Density at a single value of sigma:
power_density_equivalence_md(power_sigma = 0.10, alpha_level = .05,
                             theta1 = -.2, theta2 = .2, diff = .05,
                             sigma = .20, n = 24, nu = 22)

# Vectorized over a grid:
grid <- power_density_equivalence_md(
  power_sigma = seq(0.01, 0.40, length.out = 50),
  alpha_level = .05, theta1 = -.2, theta2 = .2, diff = .05,
  sigma = .20, n = 24, nu = 22
)
head(grid)

Run the code above in your browser using DataLab