Statalist The Stata Listserver


[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: Re: can I control the output of -test-?


From   Kit Baum <[email protected]>
To   [email protected]
Subject   st: Re: can I control the output of -test-?
Date   Sat, 2 Jun 2007 08:21:45 -0400


An even simpler way is to note that -ivreg2- assumes large samples and does OLS, so

ivreg2 price mpg foreign
test foreign

will yield the chi-squared statistic. If you want the F from -ivreg2- you must use the small option.


Kit Baum, Boston College Economics and DIW Berlin
http://ideas.repec.org/e/pba1.html
An Introduction to Modern Econometrics Using Stata:
http://www.stata-press.com/books/imeus.html


On Jun 2, 2007, at 2:33 AM, statalist-digest wrote:


You can trick Stata into thinking that it is not possible to take into
account that the sample is finite by estimating the model using -glm-
instead of for instance -regress-, as is shown in the example below.
(In essence you are estimating an OLS regression using maximum
likelihood.)

*-------- begin example -----------
sysuse auto, clear
reg price mpg foreign
test foreign
glm price mpg foreign, family(gaus) link(identity)
test foreign
*--------- end example ------------
*
*   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