"lm" or "nls" with 
the option of adding a confidence and/or prediction band.
plotFit(object, ...)
"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)
"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)
"plotFit"(object, type = c("response", "link"), interval = c("none", "confidence"), level = 0.95, data, ..., shade = FALSE, extend.range = FALSE, hide = TRUE, col.conf = if (shade) grey(0.9) else "black", border.conf = col.conf, col.fit = "black", lty.conf = if (shade) 1 else 2, lty.fit = 1, lwd.conf = 1, lwd.fit = 1, n = 500, xlab, ylab, xlim, ylim)
"plotFit"(object, data, ..., extend.range = FALSE, hide = TRUE, col.fit = "black", lty.fit = 1, lwd.fit = 1, n = 500, xlab, ylab, xlim, ylim)
"plotFit"(object, data, ..., extend.range = FALSE, hide = TRUE, col.fit = "black", lty.fit = 1, lwd.fit = 1, n = 500, xlab, ylab, xlim, ylim)"lm", "glm", 
or "nls".plot.adjust = "Bonferroni" or
when adjust = "Scheffe" and interval = "prediction".FALSE."link" is on the 
scale of the linear predictor. This option is only used when
plotting "glm" objects.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 = "skyblue4", col.pred = "lightskyblue2")  
Run the code above in your browser using DataLab