search for: lnfit

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

Did you mean: nfit
2008 Aug 29
1
nls() fails on a simple exponential fit, when lm() gets it right?
...ents[2] cat("Best logarithmic fit is (",ytxt,")=(aaa*log(",xtxt,")+bbb) with parameters aaa=",bfaaa,"and bbb=",bfbbb,"\n") #Produces: Best logarithmic fit is ( Height in m )=(aaa*log( DBH in mm )+bbb) with parameters aaa= 7.551666 and bbb= 4.594367 lnfit=lm(height~log(dbh)) #This is doing the ln fit without a self-start function cat("Done another, simpler, way, the best logarithmic fit has parameters: aaa=",lnfit$coefficients[2],"and bbb=",lnfit$coefficients[1],"\n") #Produces: Done another, simpler, way, the best loga...