I plotted my data on a natural log-log scale and I seem to get a okay fit to the data with y=1.19 - 0.116x with Rsq = 0.29
I want to use the parameters but plot the row data with an exponential curve. Using my knowledge of exponents, I exponentiated both sides and tried to plot a curve of y ~ (-1.12 x) + 3.2 ...but I did not get a fit. I played around with some more functions, and the only fit I could get to work was this
ggplot(data=df,aes(x=x.number,y=y.size)) + geom_point() +
stat_smooth(method="nls", formula = y~(a*exp(-x*b) +
c),method.args=list(start=c(a=10, b=0.05, c=3)), se=F,
color="red") + stat_smooth(method="lm", formula =
y~a*exp(-x*b) + c , se=F, color="blue")
The formulae seems to require additional terms and the starting values are vastly different. I am trying to reconcile with the fits and I'm not sure how to go about it