tost.  Two One-Sided Tests of Equivalence.
Program by Alexis Dinno.
Support: alexis.dinno@pdx.edu
Version: 3.1.9 (updated Jan 25, 2026)
Distribution-Date: 25jan2026

This package includes tostt and tostti which perform t tests for mean 
equivalence, tostpr and tostpri which performs z tests for proportion 
equivalence, tostmcc and tostmcci which performs z tests for equivalence of 
marginal probabilities in paired data (i.e. McNemar's test), tostregress 
performs tests for equivalence of multiple linear regression coefficients and 
zero, and the tostsignrank and tostranksum which perform approximate z tests 
for the nonparametric equivalence tests in paired and unpaired data, 
respectively.

This package is written for Stata versions 8 and up.

All feature and bug requests are welcome and will be considered.

HISTORY

25jan2026 (3.1.9)  fixed a bug with the calculation of the positivist z test 
                   statistic when using tostpri for two-sample relevance tests
                   and the Hauck-Anderson continuity correction.

24jan2026 (3.1.8)  fixed a bug in confidence interval calculations reported in
                   tostpri and tostpri. implemented unit tests for the relevant
                   subprograms.

21jan2026 (3.1.7)  fixed a run time error in tostpri. fixed a subtle bug in 
                   tostregress that could give errors from approximately the 7th
                   significant digit. fixed a bug where tostmcc would not 
                   provide return values. various very minor edits to help 
                   files. implemented comprehensive units tests for the entire
                   package, including all examples which should increase the
                   speed at which future bugs are identified and fixed. minor 
                   refactoring of code.

13jan2026 (3.1.6)  overhaul of documentation for tost. many minor minor tweaks
                   to output and documentation of many of the tost commands. 
                   fixed a serious bug with the tostpri command which would fail
                   ungracefully and produce no output when using the relevance 
                   option. fixed the missing implementation in tostregress of 
                   warnings about values of Delta or epsilon which are too 
                   small. fixed a serious error in implementing continuity
                   corrections in tostpr and tostpri, and a serious error in 
                   implementations of both test's basic calculation. revised 
                   tostpr and tostpri examples to use published data.

16oct2024 NOTE     bugfix to tostregress.

14oct2024 NOTE     accidentally uploaded a mangled version of the tost package
                   on 10-12-2024. corrected without changing version number 
                   10-14-2024. if you are unsure if you installed the mangled 
                   version, uninstall and reinstall.

12oct2024 (3.1.5)  major refactoring of code. improvements to output in all
                   tost programs, including tighter integration of unicode
                   output for versions of stata 14+. more consistent positivist
                   output for several programs. added an option to explicitly 
                   use the exact chi-sq p-values for tostrrp and tostrrpi. 
                   various tost programs now incorporate continuity correction 
                   options into positivist tests when using the relelevance 
                   option. revised examples in documentation provide clearer
                   use of the epsilon eqvtype, and provide more examples 
                   rejecting the negativist null hypothesis.

10oct2023 (3.1.4)  extremely minor update to tostmcc documentation.

15may2021 (3.1.3)  extremely minor updates to most documentation, and  
                   output. notable revision to the way that the null and
                   alternative hypotheses are expressed for tostsignrank.

27feb2021 (3.1.2)  corrected a silly clerical error in output formatting of 
                   specific negativist null and alternative hypotheses, where
                   the inequality directions were inaccurately reversed for
                   Ho1. the computations, rel option and such were not 
                   affected.  this affected all commends except tostrrp, 
                   tostrrpi, and tostregress.

20may2020 (3.1.1)  removed outdated and erroneous warning about using
                   continuity corrections in tostpr.

20nov2019 (3.1.0)  implemented unicode output for those using stata v14 and
                   higher. made minor documentation adjustments. fixed a bug
                   in tostrrp & tostrrpi when calling either without the 
                   relevance option.

15nov2019 (3.0.3)  correctly implemented tostregress for stata versions
                   11 to 13. revised documented examples to indicate that the
                   beta option requires explicitly fitting the model.
                   corrected a bug that could occur when using the vce
                   option.

08aug2018 (3.0.2)  removed swilk and sfrancia commands as they were based on 
                   a profound misconception on my part about how these test 
                   statistics behave.

22mar2018 (3.0.1)  corrected a major bug in the yates and edwards options in
                   tostpr. these continuity corrections had been implemented 
                   incorrectly.

23oct2017 (3.0.0)  major feature added with the tostregress command. 
                   tostregress permits tests for equivalence and relevance 
                   tests in a multiple linear regression context. most of the 
                   options available to regress are present in tostregress. 
                   minor documentation updates also.

12aug2017 (2.1.1)  corrected a bug in the confidence interval for the first
                   value of the outcome variable in the two-sample test of
                   proportions (tostpr only, this bug did not appear in 
                   tostpri). clarified documentation of the clear option, and 
                   clarified that the ha and yates continuity corrections 
                   apply only to the two one-sided test statistics, and not to 
                   the confidence intervals.  made similar improvements 
                   regarding continuity corrections in the documentation for 
                   tostmcc/tostmcci.  corrected the nomenclature for the one-
                   sided hypotheses in the two-sample test for proportion 
                   equivalence (again: only for tostpr).  added a relevance 
                   testing option for tostrrp/tostrrpi.

19apr2017 (2.1.0)  added tostrrp and tostrrpi to test equality of risks in 
                   paired randomized control trial and paired cohort designs.

24jun2016 (2.0.4)  fixed a reporting bug where, when the relevance option
                   was specified for the two-sample versions of the z and t
                   tests (in both regular, and immediate forms), the 
                   conclusion for the equivalence test always reported 
                   Reject, regardless of the (correctly reported) alpha or 
                   p-value.

03mar2016 (2.0.3)  corrected the warning error given by tostsignrank when a
                   value of epsilon is smaller than the critical value of z.

22feb2016 (2.0.2)  corrected minor output bugs that could show when using the
                   relevance option, including one that could break
                   relevance testing output when using tostpr.

13feb2016 (2.0.1)  added the relevance test conclusion to return values, when
                   the relevance option is used.

02nov2015 (2.0.0)  added the relevance option to perform combined tests
                   of difference and equivalences for all tests. minor bug
                   and documentation fixes.

27aug2015 (1.7.1)  removed a fatal bug in tostsignrank, and improved
                   documentation for the whole package.

06may2015 (1.7.0)  added two one-sided shapiro-wilk and shapiro-francia 
                   tests for normal equivalence based on z equivalence tests.
                   also replaced the level option with the alpha
                   option across the whole package. various improvements to
                   documentation across the package added.

06apr2015 (1.6.3)  corrected a minor bug where the value of z2 given by the
                   return command replicated the value for z1 in tostt, 
                   tostti, tostpr, and tostpri. the values output to the
                   display were and remain correct.

07jul2014 (1.6.2)  minor documentation update.

14mar2014 (1.6.1)  added a help file for the tost package as a whole

02mar2014 (1.6.0)  added wald-type z test of equivalence in paired binary
                   data (i.e. the equivalence test counterpart to mcnemar's 
                   test) with documentation. minor tweaks to other tost 
                   output and help files.

01mar2014 (1.5.0)  added equivalence tests based on the approximate z tests
                   for the nonparametric signed-rank and rank sum tests. 
                   help files have been improved, and also reflect the new 
                   commands. tostpr output has been slightly improved.

28feb2014 (1.4.0)  added the capability to specify asymmetric equivalence
                   intervals using the new uppereqvlevel() option. improved
                   help files and revised to reflect new capabilities.

27feb2014 (1.3.1)  added a warning if tolerance levels are specified too low
                   for the data to reject any null hypothesis of difference 
                   as large as that tolerance, and expanded on the math 
                   behind this warning in the documentation. the help files
                   were also given other minor improvements. a bug in the 
                   tabled output values was corrected (specifically the diff
                   lines, and, where applicable, the combined line).

26feb2014 (1.3.0)  added yates and hauck-anderson continuity correction
                   options for two-sample tests of proportions using
                   tostpr and tostpri. updated documentation.

25feb2014 (1.2.5)  eliminated the liberal, strict and very strict options
                   for specifying the equivalence levels with epsilon due to 
                   my misinterpreting some of the equivalence testing 
                   literature. the documentation has been updated to reflect
                   this change, along with a few other improvements.

13feb2014 (1.2.4)  corrected a mistake in output text and documentation (the
                   absolute value signs were in the wrong places: actual 
                   estimates remain unchanged).

21dec2013 (1.2.3)  removed the scaling feature on t tests of equivalence 
                   because the justification for it is less clear than i 
                   would like. if you desire it be implemented, contact me 
                   and convince me to add a scale() option. :) documentation 
                   changed slightly.

26nov2013 (1.2.2)  minor update, involving slightly different tolerance 
                   scaling factors for unpaired t tests, as per wellek, 2010.

25nov2013 (1.2.1)  minor update making specification of epsilon values more
                   explicit, with t tests using the eqvtype() and eqvlevel()
                   options. see help file for more information.

03nov2013 (1.2.0)  significant update adding the ability to specify the 
                   equivalence threshold either in terms of the units of the 
                   variables being tested (or their proportions), or of units 
                   of the t distribution with appropriate degrees of freedom 
                   for mean tests and the z distribution for proportion tests.
                   the documentation has been improved and new features 
                   documented there as well. these new features are available 
                   for both standard and immediate commands.

30oct2013 (1.1.2)  minor documentation improvements

09mar2013 (1.1.1)  first public release of the tostti and tostpri commands
                   which provide immediate forms of the t and z tests for
                   equivalence. documentation is also updated.

06mar2013 (1.1.0)  first public release of the tostpr command, which performs
                   tests of proportion equivalence. documentation and
                   output for tostt were also improved.

04mar2013 (1.0.3)  documentation changes were made to tostt help files due
                   to incompatibility of ascii codes across operating 
                   systems.

03mar2013 (1.0.1)  first public release of tost. includes tostt which 
                   provides t tests of mean equivalence.
