SSexp {nlrwr} | R Documentation |
This function is a self starter function for use with nls
and related functions.
SSexp(predictor, y0, b)
predictor |
a numeric vector of predictor values |
y0 |
a numeric parameter representing the reponse level at predictor=0 |
b |
a numeric parameter related to the speed of the exponential changes |
The self starter function relies on linearization of the mean function and subsequently ordinary least squares is applied.
A numeric vector of the same length as predictor
containing the mean function y0exp(x/b) evaluated
in x for the provided predictor values.
Christian Ritz
## self starter converges in 2 iterations RGRcurve.m1 <- nls(RGR ~ SSexp(Day, y0, b), data=RGRcurve) summary(RGRcurve.m1) ## plinear needs a few interations more RGRcurve.m2 <- nls(RGR ~ exp(Day/b), data=RGRcurve, algorithm="plinear", start=list(b=1)) summary(RGRcurve.m2)