[R] Finding starting values for the parameters using nls() or nls2()

Pinglei Gao gaopinglei at 163.com
Tue Oct 25 17:01:21 CEST 2016

Dear Dave
Thanks for your kindness help. I am sorry, I am on a filed survey these days. I did not check my email for a long time. Please forgive me for the misunderstanding brought to you. Your answer works well for the model: Retention = exp (b0*exp (b1*Area^th)). Could you find the starting values for the another model: Retention = (b0*Area^(th+1))^b with the same data for me. I also asked the same question on R-help list before.



发件人: dave fournier [mailto:davef at otter-rsch.com] 
发送时间: 2016年10月20日 5:47
收件人: r-help at r-project.org; gaopinglei at 163.com
主题: Re: [R] Finding starting values for the parameters using nls() or nls2()

Actually this converges very nicely if you use these starting values that I obtained with AD Model Builder

        th     9.1180e-01
        b0    5.2104e+00
        b1   -4.6725e-04

The R result looks like

Nonlinear regression model
   model: Retention ~ expFct(Area, b0, b1, th)
    data: structure(list(Area = c(521.5, 689.78, 1284.71, 2018.8, 2560.46, 524.91, 989.05, 1646.32, 2239.65, 2972.96, 478.54, 875.52, 1432.5, 2144.74, 2629.2), Retention = c(95.3, 87.18, 44.94, 26.36, 18.12, 84.68, 37.24, 33.04, 23.46, 9.72, 97.92, 71.44, 44.52, 24.44, 15.26)), .Names = c("Area", "Retention"), row.names = c(NA, -15L), class = "data.frame")
         b0         b1         th
  5.2104466 -0.0004672  0.9118029
  residual sum-of-squares: 686.8

Number of iterations to convergence: 1
Achieved convergence tolerance: 1.75e-06

More information about the R-help mailing list