The Ratkowsky2
data frame has 9 rows and 2 columns.
This data frame contains the following columns:
A numeric vector of pasture yields.
A numeric vector of growing times.
This model and data are an example of fitting sigmoidal growth curves taken from Ratkowsky (1983). The response variable is pasture yield, and the predictor variable is growing time.
Ratkowsky, D.A. (1983). Nonlinear Regression Modeling. New York, NY: Marcel Dekker, pp. 61 and 88.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21  Try < function(expr) if (!inherits(val < try(expr), "tryerror")) val
plot(y ~ x, data = Ratkowsky2)
Try(fm1 < nls(y ~ b1 / (1+exp(b2b3*x)), data = Ratkowsky2, trace = TRUE,
start = c(b1 = 100, b2 = 1, b3 = 0.1)))
Try(fm1a < nls(y ~ b1 / (1+exp(b2b3*x)), data = Ratkowsky2,
trace = TRUE, alg = "port",
start = c(b1 = 100, b2 = 1, b3 = 0.1)))
Try(fm2 < nls(y ~ b1 / (1+exp(b2b3*x)), data = Ratkowsky2, trace = TRUE,
start = c(b1 = 75, b2 = 2.5, b3 = 0.07)))
Try(fm2a < nls(y ~ b1 / (1+exp(b2b3*x)), data = Ratkowsky2,
trace = TRUE, alg = "port",
start = c(b1 = 75, b2 = 2.5, b3 = 0.07)))
Try(fm3 < nls(y ~ 1 / (1+exp(b2b3*x)), data = Ratkowsky2, trace = TRUE,
start = c(b2 = 1, b3 = 0.1), alg = "plinear"))
Try(fm4 < nls(y ~ 1 / (1+exp(b2b3*x)), data = Ratkowsky2, trace = TRUE,
start = c(b2 = 2.5, b3 = 0.07), alg = "plinear"))
## Using a selfstarting model
Try(fm5 < nls(y ~ SSlogis(x, Asym, xmid, scal), data = Ratkowsky2))
summary(fm5)

Questions? Problems? Suggestions? Tweet to @rdrrHQ or email at ian@mutexlabs.com.
Please suggest features or report bugs with the GitHub issue tracker.
All documentation is copyright its authors; we didn't write any of that.