I am an R newbie trying to fit plant photosynthetic light response curves (saturating, curvilinear) to a particular model accepted by experts. The goal is to get estimated c
minpack.lm to the rescue:
library(minpack.lm)
curve.nlslrc = nlsLM(photolrc ~ Am*(1-((1-(Rd/Am))^(1-(PARlrc/LCP)))),
start=list(Am=(max(photolrc)-min(photolrc)),
Rd=-min(photolrc),
LCP= (max(photolrc)-1)),
data = curvelrc)
coef(curve.nlslrc)
# Am Rd LCP
#8.011311 1.087484 -20.752957
plot(photolrc ~ PARlrc, data = curvelrc)
lines(0:1300,
predict(curve.nlslrc,
newdata = data.frame(PARlrc = 0:1300)))
If you pass start = list(Am = 8, Rd = 1, LCP = -20)
to nls
you also get a successful fit.
I don't know if the parameter values are sensible estimates considering the science behind this. Can LCP be negative?