I have a simple dataset and I am trying to use the power trend to best fit the data. The sample data is very small and is as follows:
structure(list(Discharg
2018 Update:
The call "start" now seems to be depreciated. It is not in the stat_smooth function information either.
If you want to choose starting values, you need to use "method.args" option now.
See changes below:
ggplot(DD,aes(x = Discharge,y = Age)) +
geom_point() +
stat_smooth(method = 'nls', formula = 'y~a*x^b', method.args = list(start= c(a = 1,b=1)),se=FALSE) + geom_text(x = 600, y = 1, label = power_eqn(DD), parse = TRUE)