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

st: Re: one sided test


From   Joseph Coveney <[email protected]>
To   Statalist <[email protected]>
Subject   st: Re: one sided test
Date   Sun, 10 Oct 2004 20:52:39 +0900

Levy Lee wrote:

Just the following simple and naive question

How can i perform a one sided test after a linear regression?

after this regression
      regress y x1 x2
i want to test if the coefficient of x2 is greater than 0

-------------------------------------------------------------------------------

A couple of ways:

drawnorm y x1 x2, n(20)
* First way:  does the 90% CI for x2 lie above zero? (Tests at alpha = 0.05)
regress y x1 x2, level(90)
* Second way (assumes that you know that the coefficient is greater than zero):
test x2
display r(p) / 2 
Joseph Coveney


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