Re: [R] problem fitting 2 term exponential with nls

2013-10-26 Thread William Dunlap
ill Dunlap Spotfire, TIBCO Software wdunlap tibco.com > -Original Message- > From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On > Behalf > Of Berend Hasselman > Sent: Friday, October 25, 2013 9:54 PM > To: Tom Wright > Cc: r-h...@stat.math.ethz.c

Re: [R] problem fitting 2 term exponential with nls

2013-10-25 Thread Berend Hasselman
On 25-10-2013, at 17:29, Tom Wright wrote: > Hi, > Can anyone explain why the nls function is giving an error? > Thanks > Tom > >> head(d) >age time > 1 23.57 223.0 > 2 42.63 223.0 > 3 62.30 222.0 > 4 32.93 220.5 > 5 9.37 228.0 > 6 23.83 227.0 > >> fit<-nls(d$

[R] problem fitting 2 term exponential with nls

2013-10-25 Thread Tom Wright
Hi, Can anyone explain why the nls function is giving an error? Thanks Tom > head(d) age time 1 23.57 223.0 2 42.63 223.0 3 62.30 222.0 4 32.93 220.5 5 9.37 228.0 6 23.83 227.0 > fit<-nls(d$time~a1*exp(b1*d$age) + a2*exp(b2*d$age)+c ,start(a1=10