residPlot: Fitted values versus residuals plot

Description Usage Arguments Value See Also Examples

Description

Plots a scatter plot for the variables of the residuals and fitted values from the linear model, lmfit. A lowess smooth line for the underlying trend, as well as one standard deviation error bounds for the scatter about this trend, are added to this scatter plot. A test for a quadratic relationship between the residuals and the fitted values is also computed.

Usage

1
residPlot(lmfit,f=0.5)

Arguments

lmfit

an lm object, i.e. the output from "lm()".

f

the smoother span. This gives the proportion of points in the plot which influence the smooth at each value. Larger values give more smoothness.

Value

Returns the plot.

See Also

"trendscatter"

Examples

1
2
3
4
# Peruvian Indians data
data(peru.df)
fit<-lm(BP~age+years+weight+height, data = peru.df)
residPlot(fit)


Search within the s20x package
Search all R packages, documentation and source code

Questions? Problems? Suggestions? or email at ian@mutexlabs.com.

Please suggest features or report bugs with the GitHub issue tracker.

All documentation is copyright its authors; we didn't write any of that.