Learn R Programming

equivalence (version 0.7.2)

ptte.stat: Computes a paired t-test for equivalence from the mean and standard deviation of a sample from a normally-distributed population

Description

This function computes the test and key test quantities for the paired t-test for equivalence, as documented in Wellek (2003, pp 77-80). This function computes the test from the mean and standard deviation of a sample of paired differences from a normally-distributed population.

Usage

ptte.stat(mean, std, n, alpha = 0.05, Epsilon = 0.25)

Value

A list with the following components

Dissimilarity

the outcome of the test of the null hypothesis of dissimilarity

Mean

the mean of the sample

StdDev

the standard deviation of the sample

n

the sample size

alpha

the size of the test

Epsilon

the magnitude of the region of similarity

cutoff

the critical value

Tstat

the test statistic; if Tstat < cutoff then the null hypothesis is rejected.

Power

the power of the test evaluated at the observed value

Arguments

mean

the sample mean

std

the sample standard deviation

n

sample size

alpha

test size

Epsilon

magnitude of region of similarity

Author

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

Details

This test requires the assumption of normality of the population. Under that assumption the test is the uniformly most powerful invariant test (Wellek, 2003, pp. 78-79). This version of the test can be applied post-hoc to any testing situation in which you have the mean, standard deviation, and sample size, and are confident that the sample is drawn from a normally-distributed population.

The function as documented by Wellek (2003) uses units relative to the standard deviation, noting (p. 12) that 0.25 corresponds to a strict test and 0.5 to a liberal test.

References

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.

See Also

ptte.data, tost.stat

Examples

Run this code
data(ufc)
ptte.stat(mean(ufc$Height.m.p - ufc$Height.m, na.rm=TRUE),
  sd(ufc$Height.m.p - ufc$Height.m, na.rm=TRUE),
  sum(!is.na(ufc$Height.m.p - ufc$Height.m)))

Run the code above in your browser using DataLab