"lm"
or "nls"
with
the option of adding a confidence and/or prediction band.plotFit(object, ...)## S3 method for class 'lm':
plotFit(object, interval = c("none", "both", "confidence",
"prediction"), level = 0.95, data, adjust = c("none", "Bonferroni",
"Scheffe"), k, ..., shade = FALSE, extend.range = FALSE, hide = TRUE,
col.conf = if (shade) grey(0.7) else "black", col.pred = if (shade)
grey(0.9) else "black", border.conf = col.conf, border.pred = col.pred,
col.fit = "black", lty.conf = if (shade) 1 else 2, lty.pred = if (shade)
1 else 3, lty.fit = 1, lwd.conf = 1, lwd.pred = 1, lwd.fit = 1,
n = 500, xlab, ylab, xlim, ylim)
## S3 method for class 'nls':
plotFit(object, interval = c("none", "both", "confidence",
"prediction"), level = 0.95, data, adjust = c("none", "Bonferroni",
"Scheffe"), k, ..., shade = FALSE, extend.range = FALSE, hide = TRUE,
col.conf = if (shade) grey(0.7) else "black", col.pred = if (shade)
grey(0.9) else "black", border.conf = col.conf, border.pred = col.pred,
col.fit = "black", lty.conf = if (shade) 1 else 2, lty.pred = if (shade)
1 else 3, lty.fit = 1, lwd.conf = 1, lwd.pred = 1, lwd.fit = 1,
n = 500, xlab, ylab, xlim, ylim)
"lm"
or "nls"
.plot
.adjust = "Bonferroni"
or
when adjust = "Scheffe"
and interval = "prediction"
.FALSE
.F. Baty and M. L. Delignette-Muller (2012), A Toolbox for Nonlinear Regression in R: The Package nlstools. Journal of Statistical Software (under revision).
##
## A nonlinear regression example
##
data(Puromycin, package = "datasets")
Puromycin2 <- Puromycin[Puromycin$state == "treated", ][, 1:2]
Puro.nls <- nls(rate ~ Vm * conc/(K + conc), data = Puromycin2,
start = c(Vm = 200, K = 0.05))
plotFit(Puro.nls, interval = "both", pch = 19, shade = TRUE,
col.conf = "darkgrey", col.pred = "lightgrey")
Run the code above in your browser using DataLab