NLS Regression in GGPlot2, Plotting y=Ax^b Trendline Error
问题 I'm attempting to fit a basic power trendline on a set of 3 data point, as you could do in Excel to mimic the y = Ax^b function. I have a very simple data set loaded into LCurve.data as follows: MDPT = {4, 10.9, 51.6} AUC = {287069.4, 272986.0, 172426.1} fm0 <- nls(log(LCurve.data$AUC) ~ log(a) + b * log(LCurve.data$MDPT), data = LCurve.data, start = list (a = 1, b =1)) ggplot(LCurve.data, aes(x=MDPT, y = AUC)) + geom_line() + geom_point() + stat_smooth(method = 'nls', formula = y ~ a * x ^ b