predict_plot: Plot predictors versus response

View source: R/plot.R

predict_plotR Documentation

Plot predictors versus response

Description

Makes a matrix of pairwise scatterplots with lowess-type trend lines.

Usage

predict_plot(...)

Arguments

...

extra arguments passed to predict_plot.data.frame or plot.

formula

a formula specifying the response and predictor variables

data, x

a data frame with at least two columns

partial

a model from which to compute partial residuals (used by predict_plot.lm).

mcol, mlwd

If plotting partial residuals of an lm, the color and width of the model predictions.

layout

a vector c(rows,cols) specifying the desired layout of panels. Otherwise chosen automatically based on the size of the plotting window.

highlight

a logical vector specifying which predictors to highlight.

se

If TRUE, show standard errors in linecharts.

scol, slwd

color and width of trend lines.

span, degree, family

parameters for the trend line (see loess).

rtype

how a factor response should be handled when drawing a trend line.

identify.pred

A character vector of predictor names for which to interactively identify points. If TRUE, done for all predictors.

mar

margins within each panel

xaxt, yaxt

arguments to par

col

plotting color for symbols

asp

Aspect ratio for each panel. If "auto", the aspect ratio is chosen automatically based on the trend line and auto.aspect.

given, given.lab, nlevels, pretty, key, bg, color.palette, pch.palette

used for conditioning plots.

main, xlab, ylab

axis labels.

Value

If the predictor is numeric, makes a scatterplot with loess line on top. If the predictor is a factor, makes a linechart.

Author(s)

Tom Minka

See Also

loess, model.plot

Examples

data(Cars)
predict_plot(Price ~ ., CarsT)
fit <- lm(Price ~ ., CarsT)
predict_plot(Price~ ., CarsT, partial=fit)
# same thing using predict_plot.lm
predict_plot(fit, partial = TRUE)

paulemms/datamining documentation built on March 1, 2023, 4:01 p.m.