[R] problem with nls starting values

Ben Bolker bbolker at gmail.com
Thu Sep 27 23:17:44 CEST 2012


Bert Gunter <gunter.berton <at> gene.com> writes:

> 
> On Thu, Sep 27, 2012 at 12:43 PM, Benedikt Gehr
> <benedikt.gehr <at> ieu.uzh.ch> wrote:
> > now I feel very silly! I swear I was trying this for a long time and it
> > didn't work. Now that I closed R and restarted it it works also on my
> > machine.
> >
> > So is the only problem that my model is overparametrized with the data I
> > have?
> Probably.
> 
> > however shouldn't it be possible to fit an nls to these data?
> (Obviously) no.
> 
> I suggest you do a little reading up on optimization.
> Over-parameterization creates high dimensional ridges.

  However, I will also point out that (from my experience and
others') nls is not the most robust optimizer ... you might consider
nlsLM (in the minpack.lm package), nls2 package, and/or doing nonlinear
least-squares by brute force using bbmle::mle2 as a convenient wrapper
for optim() or optimx().

  cheers
    Ben Bolker




More information about the R-help mailing list