With minor corrections, the original problem can be "solved" with nlxb
from nlmrt package.
> coef(modeln)
a b
-0.8470857 409.5190808
ssquares = 145585533
but since
> svd(modeln$jacobian)$d
[1] 5.128345e+04 6.049076e-14
>
I may have made nlmrt too robust.
JN
On 13-07-15 06:00 AM, r-help-requ...@r-project.org wrote:
Message: 9
Date: Sun, 14 Jul 2013 16:11:40 +0100
From: Prof Brian Ripley<rip...@stats.ox.ac.uk>
To:r-help@r-project.org
Subject: Re: [R] nls power law help
Message-ID:<51e2bfac.1010...@stats.ox.ac.uk>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
On 14/07/2013 14:30, JenPool wrote:
>Hi,
>
>I am trying to use a power law y=bx^a as a nls model as below, however I
>keep getting 'singular gradient' error. I have tried multiple different
>starting values but always get an error.
That is not the model you tried to fit. b*x*exp(a) is always
over-parametrized.
______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.