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

dave fournier davef at otter-rsch.com
Wed Oct 19 23:47:12 CEST 2016


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

nls.m2
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