I don't know if we will be able to use a generic fit method here.  It is a
bit tricky to get things started since the likelihood can be quite
non-elliptical.  1-2 steepest descent iterations or a couple of EM
iterations seems to get things to the point where the scipy optimizers can
take over, but they don't usually work from generic starting values.

Once we can use scipy 0.11 we can use the minimize wrapper and pass in the
specific algorithm as an argument.


On Sat, Mar 22, 2014 at 7:16 PM, Josef Perktold <notifications@github.com>wrote:

> In statsmodels/regression/lme.py:
>
> > +                params_prof = self._pack(params_fe, cov_re_rt)
> > +            if np.max(np.abs(score(params_prof))) < gtol:
> > +                success = True
> > +
> > +        for cycle in range(10):
> > +
> > +            # Steepest descent iterations
> > +            params_prof, success = self._steepest_descent(like,
> > +                                  params_prof, score,
> > +                                  gtol=gtol, max_iter=num_sd)
> > +            if success:
> > +                break
> > +
> > +            # Gradient iterations
> > +            try:
> > +                rslt = fmin_bfgs(like, params_prof, score,
>
> I think, eventually (?) we need to use a more general setup that allows
> for the choice of optimizer and options.
> lbfgsb might be also a good choice.
> It would currently be possible by calling super().fit but needs a loglike
> method to optimize, Skipper started to outsource our optimizer wrapper.
>
> --
> Reply to this email directly or view it on GitHub<https://github.com/statsmodels/statsmodels/pull/1398/files#r10861825>
> .
>