Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at

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

Re: st: specification test after non-linear regression

From   Maarten buis <>
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: )

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

Hope this helps,

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


*   For searches and help try:

© Copyright 1996–2017 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index