Ronan Conroy wrote:
Has anyone cooked up a tost (two one-sided tests) ado?
--------------------------------------------------------------------------------
Isn't it something like that below? (Also, "test1:" and "test2:" reported
by -equim- are the TOST.)
Joseph Coveney
clear
set more off
sysuse auto
ttest price, by(foreign) level(90)
local delta = 0.2 * r(mu_1) // Domestic is "reference group"
* Option 1: By inspection, declare therapeutic equivalence if
* 90% CI is contained within the interval -delta to +delta
display in smcl as result `delta'
* Option 2: Schuirmann's Two One-sided Tests (TOST);
* reject at alpha = 10% (5%, one-sided)
* (Note: TOST is operationally equivalent to Option 1 above)
local difference = r(mu_1) - r(mu_2) // mu_reference - mu_test
display in smcl as result 2 * ttail(r(df_t), (`delta'-`difference')/r(se))
display in smcl as result 2 * ttail(r(df_t), (`delta' + `difference')/r(se))
exit
*
* For searches and help try:
* http://www.stata.com/support/faqs/res/findit.html
* http://www.stata.com/support/statalist/faq
* http://www.ats.ucla.edu/stat/stata/