Description Usage Arguments Details Value Note Author(s) References See Also Examples

This function computes the test and key test quantities for the two one-sided test for equivalence, as documented in Schuirmann (1981) and Westlake (1981). The function computes the test for a sample of paired differences or two samples, assumed to be from a normally-distributed population.

Much code in the function has been copied and adapted from R's t.test.default function.

1 2 3 |

`x` |
the first (or only) sample |

`y` |
the second sample |

`epsilon` |
magnitude of region of similarity |

`paired` |
a logical indicating whether you want a paired tost |

`var.equal` |
a logical variable indicating whether to treat the two variances as being equal. If 'TRUE' then the pooled variance is used to estimate the variance otherwise the Welch (or Satterthwaite) approximation to the degrees of freedom is used. |

`conf.level` |
confidence level of the interval |

`alpha` |
test size (for backwards-compatibility, overrides conf.level) |

`...` |
arguments to be passed to other functions. |

The function inherits infrastructure from R's t.test.default, so a number of elements have been copied from the help file of that function.

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.

A list with the following components

`estimate ` |
the mean of the difference |

`se.diff ` |
the standard error of the difference |

`alpha ` |
the size of the test |

`data.name` |
a character string giving the name(s) of the data |

`ci.diff ` |
the 1-alpha confidence interval for the difference |

`parameter ` |
the degrees of freedom used for the confidence interval |

`epsilon ` |
the magnitude of the region of similarity |

`result ` |
the outcome of the test of the null hypothesis of dissimilarity |

`method` |
a character string indicating what type of t-test was performed |

`null.value ` |
the specified hypothesized value of the mean or mean difference depending on whether it was a one-sample tost or a two-sample tost. |

`tost.p.value ` |
the p-value of the tost significance test |

`tost.interval ` |
the two one-sided confidence interval corresponding to the test. |

This test requires the assumption of normality of the population. The components of the test are t-based confidence intervals, so the Central Limit Theorem and Slutsky's Theorem may be relevant to its application in large samples.

Andrew Robinson A.Robinson@ms.unimelb.edu.au

Schuirmann, D.L. 1981. On hypothesis testing to determine if the mean of a normal distribution is contained in a known interval. Biometrics 37 617.

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.

1 2 |

```
Loading required package: lattice
Loading required package: boot
Attaching package: 'boot'
The following object is masked from 'package:lattice':
melanoma
Loading required package: PairedData
Loading required package: MASS
Loading required package: gld
Loading required package: mvtnorm
Loading required package: ggplot2
Attaching package: 'PairedData'
The following object is masked from 'package:base':
summary
Paired TOST
data: ufc$Height.m.p and ufc$Height.m
df = 376
sample estimates:
mean of the differences
0.6003913
Epsilon: 1
95 percent two one-sided confidence interval (TOST interval):
0.1916419 1.0091407
Null hypothesis of statistical difference is: not rejected
TOST p-value: 0.05389588
```

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.