search for: ssexponen

Displaying 1 result from an estimated 1 matches for "ssexponen".

2008 Aug 29
1
nls() fails on a simple exponential fit, when lm() gets it right?
...LHS,data) { xy=sortedXyData(mCall[["x"]],LHS,data) r=0.01 #Just guess r=0.01 to start the fit A=min(xy$y) #Use the minimum y value as an initial guess for A value=c(r,A) names(value)=mCall[c("r","A")] return(value) } fmla=as.formula("~(A*exp(r*x))") SSexponen=selfStart(fmla,initial=exponenInit,parameters=c("r","A")) cat("Logarithmic fit (here, the self-start and the 'simpler' way match):\n") tmp=getInitial(height~SSlogarithmic(dbh,aaa,bbb),data=data.frame(dbh,height)) cat("(Starting values for the logarithmic...