residual.plot: Residual plots of one selected component

Description Usage Arguments Value Author(s) See Also Examples

View source: R/residual.plot.R

Description

Obtain the diagnostic plots returned by plot.lm: a plot of residuals against fitted values, a Scale-Location plot of squared root of absolute value of residuals against fitted values, a Normal Q-Q plot, a plot of residuals against leverages.

Usage

1
residual.plot(db, numbercomponent, filepath)

Arguments

db

An input data frame with at least three column. A column with DateTime in standard format (yyyy-mm-dd HH:MM:SS) labeled "datetime", a column with flow records in cubic meter per second labeled "flow", and columns with scattered concentration data in milligram per litre. Alternatively, it can be used the output matrix of the function db.union.

numbercomponent

The position number of the specific compounds for which the user would obtain the plots, as the function returns the graphs for one compound at time.

filepath

An optional argument. The user can directly specify the path in which the plot must be saved. If this argument misses, the plot is showed in R window.

Value

A graphical ouput with plots of residuals against fitted values, a Scale-Location plot of squared root of absolute value of residuals against fitted values, a Normal Q-Q plot, a plot of residuals against leverages.

Author(s)

Veronica Nava

See Also

db.union rating ferguson

Examples

1
2
3
data("flow.data1","conc.data1")
union<-db.union(flow.data1, conc.data1)
residual.plot(union, 1)

RiverLoad documentation built on Jan. 4, 2022, 5:07 p.m.