Coefficient plots for Multivariate Linear Models
Displays confidence ellipses for all parameters in an multivariate linear model, for a given pair of variables. As such, it is a generalization of confidenceEllipse
.
coefplot(object, ...) ## S3 method for class 'mlm' coefplot( object, variables = 1:2, parm = NULL, df = NULL, level = 0.95, intercept = FALSE, Scheffe = FALSE, bars = TRUE, fill = FALSE, fill.alpha = 0.2, labels = !add, label.pos = NULL, xlab, ylab, xlim = NULL, ylim = NULL, axes = TRUE, main = "", add = FALSE, lwd = 1, lty = 1, pch = 19, col = palette(), cex = 2, cex.label = 1.5, lty.zero = 3, col.zero = 1, pch.zero = "+", verbose = FALSE, ... )
object
: A multivariate linear model, such as fit by lm(cbind(y1, y2, ...) ~ ...)
...
: Other parameters passed to methodsvariables
: Response variables to plot, given as their indices or namesparm
: Parameters to plot, given as their indices or namesdf
: Degrees of freedom for hypothesis testslevel
: Confidence level for the confidence ellipsesintercept
: logical. Include the intercept?Scheffe
: If TRUE
, confidence intervals for all parameters have Scheffe coverage, otherwise, individual coverage.bars
: Draw univariate confidence intervals for each of the variables?fill
: a logical value or vector. TRUE
means the confidence ellipses will be filled.fill.alpha
: Opacity of the confidence ellipseslabels
: Labels for the confidence ellipseslabel.pos
: Positions of the labels for each ellipse. See label.ellipse
xlab, ylab
: x, y axis labelsxlim, ylim
: Axis limitsaxes
: Draw axes?main
: Plot titleadd
: logical. Add to an existing plot?lwd
: Line widthslty
: Line typespch
: Point symbols for the parameter estimatescol
: Colors for the confidence ellipses, points, linescex
: Character size for points showing parameter estimatescex.label
: Character size for ellipse labelslty.zero, col.zero, pch.zero
: Line type, color and point symbol for horizontal and vertical lines at 0, 0.verbose
: logical. Print parameter estimates and variance-covariance for each parameter?Returns invisibly a list of the coordinates of the ellipses drawn
rohwer.mlm <- lm(cbind(SAT,PPVT,Raven)~n+s+ns, data=Rohwer) coefplot(rohwer.mlm, lwd=2, main="Bivariate coefficient plot for SAT and PPVT", fill=TRUE) coefplot(rohwer.mlm, add=TRUE, Scheffe=TRUE, fill=TRUE) coefplot(rohwer.mlm, var=c(1,3)) mod1 <- lm(cbind(SAT,PPVT,Raven)~n+s+ns+na+ss, data=Rohwer) coefplot(mod1, lwd=2, fill=TRUE, parm=(1:5), main="Bivariate 68% coefficient plot for SAT and PPVT", level=0.68)
confidenceEllipse
,
Michael Friendly
Useful links