Stata The Stata listserver
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

Re: st: specifying difference in Ho of ttest


From   Richard Williams <[email protected]>
To   [email protected]
Subject   Re: st: specifying difference in Ho of ttest
Date   Wed, 14 Jan 2004 13:26:36 -0500

At 12:01 PM 1/14/2004 -0500, Wandland, Kristen wrote:
Does anyone know a way to specify the difference in a ttest? The default
result is:

Ho = diff = 0

I hope to be able to do:

Ho = diff = #

where # is the standard deviation or other pre-determined value.

Thanks all.
A slightly clunky way: suppose you hypothesize the mean of X1 is 7 greater than the mean of X2. Subtract 7 from X1 and do the t-test, e.g.

gen newx1 = x1 - 7
ttest newx1 = x2

It also wouldn't be too hard to do it by hand if this is just a one-shot thing. Or, use the ttesti command, subtracting 7 from the mean of x1.


*
*   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/
*
*   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/



© Copyright 1996–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index