ellipse.lm {ellipse} | R Documentation |
This function produces the ellipsoidal outline of a pairwise confidence region for a linear model fit.
ellipse.lm(x, which=c(1, 2), level=0.95, t=sqrt(2 * qf(level, 2, x$df.residual)), ...)
x |
The first argument should be an lm object, usually resulting from a call to lm(). |
which |
Which selects the pair of parameters to be plotted. The default is the first two. |
level |
The confidence level of the region. Default 95%. |
t |
The t statistic on the boundary of the ellipse. |
... |
Other ellipse.default parameters may also be used. |
The summary function is used to obtain the covariance matrix of the fitted parameters.
A matrix with columns x and y to outline the confidence region.
ellipse.default
# Plot the joint 95% confidence region for the weight and displacement # parameters in the Fuel dataset data(fuel.frame) fit <- lm(Fuel ~ . , fuel.frame) plot(ellipse(fit,which=c('Weight','Disp.')))