plotfit {NRAIA}R Documentation

Plot x-y data and a fitted model

Description

Extract the original data from a fitted model and plot these data along with a smooth curve of the fitted model function. The fitted model must be for one covariate only.

Usage

plotfit(fm, ...)
## S3 method for class 'nls':
plotfit(fm, ...)

Arguments

fm A fitted model object, typically a nls fitted model.
... Arguments to be passed to xyplot or panel.curve.

Value

A lattice object.

See Also

xyplot, panel.curve

Examples

fm1 <- nls(rate ~ conc/(K + conc), Puromycin, c(K = 0.05),
           subset = state == "treated", alg = "plinear")
plotfit(fm1, from = 0)

[Package NRAIA version 0.9-7 Index]