Good catch.  What we really want there is trace.  It will give the same
answer but is cleaner and slightly more efficient perhaps.  I have changed
it in my GEE branch.  All tests pass locally.

Kerby

On Sat, Feb 22, 2014 at 4:04 AM, Josef Perktold <notifications@github.com>wrote:

> In statsmodels/genmod/dependence_structures/covstruct.py:
>
> > @@ -129,19 +131,19 @@ def update(self, beta, parent):
> >
> >              ngrp = len(resid)
> >              residsq = np.outer(resid, resid)
> > -            scale_inv += np.diag(residsq).sum()
> > +            scale += np.diag(residsq).sum()
>
> why do we need diag if we sum()?
>
> --
> Reply to this email directly or view it on GitHub<https://github.com/statsmodels/statsmodels/pull/1314/files#r9959713>
> .
>