plot.nls: Plotting diagnostics for an 'nls' object

View source: R/plot.nls.R

plot.nlsR Documentation

Plotting diagnostics for an nls object

Description

Three plots (selectable by the argument 'which') are currently available: a plot of residuals against fitted values (which = 1), a Normal Q-Q plot (which = 2) and a plot of predicted against expected (line) and observed (symbols). By default, the first graph is provided. As for the third graph, we can either plot all the data (type= "all") or the group means (type = "means"; the default)

Usage

  
  ## S3 method for class 'nls'
plot(fm, type = "means", 
                     xlim = NULL, res = 100, 
                     which = 3, ...)

Arguments

fm

an object of class 'nls'

type

it can be either "means" or "all". In the first case, the group means are plotted for the third graph. It is i├Čonly used when which = 3

xlim

The limits for the x-axis (x1, x2)

res

For 'which = 3', it is the resolution of the fitted line

which

The type of graph: can be 1, 2 or 3 (see description)

...

additional graphical arguments

Details

It mimicks the behaviour of the function plot.lm()

Author(s)

Andrea Onofri

Examples

data(degradation)
mod <- nls(Conc ~ NLS.expoDecay(Time, a, k),
               data = degradation)
plot(mod, which = 3)

OnofriAndreaPG/aomisc documentation built on July 4, 2023, 6:53 p.m.