ratkowsky.onions | R Documentation |
Onion yields for different densities at two locations
This data frame contains the following columns:
planting density (plants per square meter)
yield (g / plant)
location, Purnong Landing or Virginia
Spanish white onions.
Ratkowsky, D. A. (1983). Nonlinear Regression Modeling: A Unified Practical Approach. New York: Marcel Dekker.
Ruppert, D., Wand, M.P. and Carroll, R.J. (2003). Semiparametric Regression. Cambridge University Press. https://stat.tamu.edu/~carroll/semiregbook/
## Not run:
library(agridat)
data(ratkowsky.onions)
dat <- ratkowsky.onions
# Model inverse yield as a quadratic. Could be better...
libs(lattice)
dat <- transform(dat, iyield = 1/yield)
m1 <- lm(iyield ~ I(density^2)*loc, dat)
dat$pred <- predict(m1)
libs(latticeExtra)
foo <- xyplot(iyield ~ density, data=dat, group=loc, auto.key=TRUE,
main="ratkowski.onions",ylab="Inverse yield")
foo + xyplot(pred ~ density, data=dat, group=loc, type='l')
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.