J test and Cox-Pesaran test for non nested OLS models
nnest varlist
Description
nnest computes the J test and Cox-Pesaran test for non nested OLS models. The tests are discussed in W.H. Greene Econometric Analisys, 4th edition, (Prentice Hall International Editions) pages 302-305.
nnest requires that you run an OLS regression to define model 1 (M1). Such regression can be weighted and it can contain time series operators. However, it can neither contain factor-variable operators nor any function that contains a comma (such as tin, inrange, inlist, etc.). nnest then constructs the competing model 2 (M2) by collecting the regressors listed in varlist and applies the same options included in the OLS regression defining M1 to the auxiliary regressions for the tests. Finally, nnest returns a series of scalars and macros in return list.
I am grateful for the comments received from Kit Baum (kit.baum@bc.edu) in upgrading the syntax for nnest and the usual caveat applies.
Options
nnest has no options.
Example
. nnest cons . nnest cons gdp . nnest cons L(-2/3).gdp
References
W.H. Greene Econometric Analisys, 4th edition, (Prentice Hall International Editions) pages 302-305.
Author
Gregorio Impavido, IMF, USA gimpavido@imf.org