statsmodels/statsmodels — pull request #1174 by bashtage (2013-11-03 19:24:47+00:00)
Title: Comparing linear models using lagrange multiplier tests

This pull request adds a method to compare models using LM tests which are robust to heteroskedasticity and autocorrelation (if the covariance used is HC or HAC).

* Added `compare_lm_test` which implements the test
* Added `_is_nested` which tests whether models are nested
* Added `_has_constant' which can correctly detect whether a set of regressors contains a constant or constant-like variable (i.e. all dummies such that the sum is 1 or a variable which is constant but !=1.0)
* Added a large sample LR test
* Tests to cover everything but _has_constant

This requires the changes needed to allow results with HC/HAC covariances and so may not be the right track.