Much code in the function has been copied and adapted from R's t.test.default function.
tost(x, y = NULL, epsilon = 1, paired = FALSE, var.equal = FALSE, conf.level = 0.95, alpha = NULL, ...)
This test requires the assumption of normality of the population, or an invocation of large-sample theory. The function wraps around the t.test function, so it provides tosts for the same range of designs, accepts the same arguments, and handles missing values the same way.
If 'paired' is 'TRUE' then both 'x' and 'y' must be specified and they must be the same length. Missing values are silently removed (in pairs if 'paired' is 'TRUE'). If 'var.equal' is 'TRUE' then the pooled estimate of the variance is used. By default, if 'var.equal' is 'FALSE' then the variance is estimated separately for both groups and the Welch modification to the degrees of freedom is used.
Robinson, A.P., and R.E. Froese. 2004. Model validation using equivalence tests. Ecological Modelling 176, 349--358.
Wellek, S. 2003. Testing statistical hypotheses of equivalence. Chapman and Hall/CRC. 284 pp.
Westlake, W.J. 1981. Response to T.B.L. Kirkwood: bioequivalence testing - a need to rethink. Biometrics 37, 589-594.
tost.stat
, ptte.data
data(ufc)
tost(ufc$Height.m.p, ufc$Height.m, epsilon = 1, paired = TRUE)
Run the code above in your browser using DataLab