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: RE: specification test after non-linear regression

From   Cindy Gao <>
Subject   Re: st: RE: specification test after non-linear regression
Date   Wed, 16 Jun 2010 15:29:32 +0000 (GMT)

Thank you Nick for your quick reply. I did see that there was nothing under -nl postestimation-, but I thought there might be some user-written routine or other way around it. I realise that a test for omitted nonlinear variables would not make that much sense for -nl- models in general, but is there no other way of testing/checking how 'good'/appropriately specified a -nl- model is (other than just looking at the Rsq)? 

Thank you.


----- Original Message ----
From: Nick Cox <>
Sent: Wed, 16 June, 2010 17:07:00
Subject: st: RE: specification test after non-linear regression

The help for -nl postestimation- tells you what is available after -nl-. 

It doesn't include this kind of test, which doesn't make much sense with -nl- models in general. 


Cindy Gao

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

(where depvar is the dependent variable, var1-3 are explanatory variables, and indicator is an indicator variable). (This can also be done by going to the Statistics item on the menu, then linear models and related, then other, nonlinear least squares). The regression runs successfully and I obtain my results.

The problem comes when I try to run the specification test immediately afterwards. I try to run the Ramsey specification test  ( - estat ovtest - ) but get the following error message:

invalid subcommand ovtest

I have tried even with alternative nonlinear regressions and get the same outcome. Does this-ovtest-  command not work in general after running a nonlinear regression? How then to do a specification test in any other way? I really need to do one.

*   For searches and help try:


*   For searches and help try:

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