Displaying 1 result from an estimated 1 matches for "logarithmicinit".
2008 Aug 29
1
nls() fails on a simple exponential fit, when lm() gets it right?
...8.9,9.0,9.1,9.2,11.8,11.9,12.0,12.1,14.9,15.1,15.2,15.5)
height=c(5.770089,5.154794,4.888847,6.356770,14.849109,14.973146,15.423816,14.865038,21.335985,20.477624,20.915823,21.886004,23.714724,24.182210,23.954929,23.784659,25.334360,25.411320,26.218614,25.612478)
#&#&#height=5*exp(0.03*dbh)
logarithmicInit=function(mCall,LHS,data) {
xy=sortedXyData(mCall[["x"]],LHS,data)
aaa=0.01 #Just guess aaa=0.01 to start the fit
bbb=min(xy$y) #Use the minimum y value as an initial guess for bbb
value=c(aaa,bbb)
names(value)=mCall[c("aaa","bbb")]
return(value)
}
fmla=as.form...