predict.plot {mining}R Documentation

Plot predictors versus response.

Description

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

Usage

predict.plot(...)
predict.plot.formula(formula,data=parent.frame(),...)
predict.plot.data.frame(x,layout=NULL,partial=NULL,
                           rtype=c("prob","logit","probit"),
                           highlight,se=T,
                           identify.pred=F,
                           mcol=0,mlwd=2,
                           scol="red",slwd=2,
                           span=2/3,degree=2,family="symmetric",
                           mar=NA,bg=par("bg"),
                           xaxt=par("xaxt"),yaxt=par("yaxt"),
                           col=1,asp=NULL,
                           given=NULL,given.lab=NULL,nlevels=2,
                           pretty=T,key=!is.null(given),
                           color.palette=default.colors,
                           pch.palette=default.pch,
                           main=NULL,xlab,ylab,...)

Arguments

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.
... extra arguments passed to predict.plot.data.frame or plot.

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=T)

[Package Contents]