Bookmark and Share

Notice: On March 31, it was announced that Statalist is moving from an email list to a forum. The old list will shut down on April 23, and its replacement, statalist.org is already up and running.


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: st: specification test after non-linear regression


From   Maarten buis <maartenbuis@yahoo.co.uk>
To   statalist@hsphsun2.harvard.edu
Subject   Re: st: specification test after non-linear regression
Date   Wed, 16 Jun 2010 15:48:32 +0000 (GMT)

--- On Wed, 16/6/10, Cindy Gao wrote:
> I am trying to find out how to do a specification test
> (e.g. to test whether specification is correct, omitted
> variables etc) after running a non-linear least squares
> regression. My regression command is of the form:
> 
> - nl (depvar = {b0} + {b1}*var1+ indicator*({b2} +
> {b3}*var1) + {b4}*var2 + {b5}*var3) -

There is no need to use -nl- here: this is just a simple
regression with an interaction terms:

*----------------- begin example ----------------------
sysuse auto, clear
nl (price = {b1}*mpg+ foreign*({b2} + {b3}*mpg) + {b0})
gen forXmpg = foreign * mpg
reg price mpg foreign forXmpg
*------------------- end example ----------------------
(For more on examples I sent to the Statalist see: 
http://www.maartenbuis.nl/example_faq )

So you can just use -regress- and all the post-estimation
commands that are avaialbe after that.

Hope this helps,
Maarten

--------------------------
Maarten L. Buis
Institut fuer Soziologie
Universitaet Tuebingen
Wilhelmstrasse 36
72074 Tuebingen
Germany

http://www.maartenbuis.nl
--------------------------


      

*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/


© Copyright 1996–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   Site index