statsmodels/statsmodels — pull request #1694 by kshedden (2014-05-26 07:44:14+00:00)
Title: MAINT: Refactor GEE to put categorical models in subclasses

The main goal here is to pull all the categorical model code out of the main GEE class, and put it into two subclasses (OrdinalGEE and NominalGEE). We also have new results classes specific to these data types.

A few other changes:

* Fixed a bug in the GlobalOddsRatio code (this requires changing the numbers in the regression tests)

* When the working covariance matrix is not really a covariance matrix, project it to a covariance matrix using cov_nearest (greatly reduces failures for categorical data fits).

* Add a plot_distribution method for the nominal case, that parallels the one we have for the ordinal case.

* Add a sensitivity analysis convenience function that fits the model for a sequence of dependence parameters (rather than optimizing over dependence parameters as is done in a standard GEE fit).

* Removed the points from the isotropic dependence diagnostic plot (they don't help)

* (not part of PR): added a notebook to the statsmodels wiki demonstrating nominal data analysis with GEE.