statsmodels/statsmodels — pull request #1018 by guyrt (2013-08-02 20:40:22+00:00)
Title: [Do not merge] Granger cleanup and nobs check

Addresses issue #347.

I've included two tests. First is a restriction on the number of observations required for a given max lag.

Second is a test that catches co-linearity between two time series. For now, this actually raises a ValueError. I did this because I was already getting an error and this one is much cleaner. Suggestions welcome.

In order to DRY out the code, I added condition number and eigenvalue caches to RegressionResults. These were then utilized in where appropriate.

I'll remove the do not merge tag when I add a few tests, but I want to submit this for comments, particularly with respect to the changes to RegressionResults.