The key lines are

library(nlmrt)
test <- nlxb(expf2, start= c(b0=.1, b1=1, th=.1), trace=TRUE, data=cl)

Thus I started with .1 1 and .1. The "solution" from nlxb, which is using 
analytic derivatives
and a very aggressive Marquardt code to keep trying even in bad situations, was
as you included below. Note that the singular values of the Jacobian are given 
(they are
recorded on the same table as the parameters, but do NOT correspond to the 
parameters.
The placement was simply a tidy place to put these numbers.)

The ratio of these sv's is 1.735e+16/0.004635 or approx 4E+18, so the condition 
number
of the traditional Gauss Newton approach is about 1E+37. Not a nice problem!

You probably should reformulate.

JN




On 16-10-10 10:41 AM, Pinglei Gao wrote:
> Thanks very much for your kindness help. I run your script then came out
> lots of outputs and I also studied the solution you posted. Forgive my
> ignorance, I still can't find the suitable starting values. Did I
> misunderstand something?
> 
> Best,
> 
> Pinglei Gao
> 
> -----邮件原件-----
> 发件人: ProfJCNash [mailto:profjcn...@gmail.com] 
> 发送时间: 2016年10月10日 10:41
> 收件人: Gabor Grothendieck; Pinglei Gao
> 主题: Re: [R] Finding starting values for the parameters using nls() or
> nls2()
> 
> I forgot to post the "solution" found by nlmrt:
> 
> nlmrt class object: x
> residual sumsquares =  1086.8  on  15 observations
>     after  5001    Jacobian and  6991 function evaluations
>   name            coeff          SE       tstat      pval      gradient
> JSingval
> b0            5.3274e-14            NA         NA         NA  -6.614e+13
> 1.735e+16
> b1               33.5574            NA         NA         NA      -3.466
> 11518
> th           -0.00721203            NA         NA         NA      -740.8
> 0.004635
> 
> 
> Note the singular values -- this is the worst SV(max)/SV(min) ratio I've
> observed!
> 
> JN
> 
> 
>

______________________________________________
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
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.

Reply via email to