* * Example 14.3, page 572 * Non-linear least squares * cal 1970 open data table14-2.prn data(format=prn,org=columns) 1970:1 1999:1 * nonlin b1 b2 b3 frml logpop = b1/(1+exp(b2+b3*time)) * * The following aren't great initial values, and end up needing some extra * iterations. Note, BTW, that RATS gets different (and better fitting) values * than cited in the text. * compute b1=200.0,b2=b3=0.0 nlls(frml=logpop,iters=500) uspop * * Try again from the text coefficients * compute b1=1432,b2=1.796,b3=-.0117 nlls(frml=logpop) uspop