Added variable plot
an added variable plot using the predictive terms in
the response values in
y, the added term in column
and the model with current terms specified by
an n-by-p matrix of n observations
of p predictive terms.
vector of n response values.
a scalar index specifying the column of
the term to be added.
inmodel is a logical vector
of p elements specifying the columns of
the current model. By default, all elements of
addedvarplot automatically includes a constant
term in all models. Do not enter a column of 1s directly into
stats output from the
to improve the efficiency of repeated calls to
Otherwise, this syntax is equivalent to the previous syntax.
Added variable plots are used to determine the unique effect of adding a new term to a multilinear model. The plot shows the relationship between the part of the response unexplained by terms already in the model and the part of the new term unexplained by terms already in the model. The “unexplained” parts are measured by the residuals of the respective regressions. A scatter of the residuals from the two regressions forms the added variable plot.
In addition to the scatter of residuals, the plot produced by
95% confidence intervals on predictions from the fitted line. The
fitted line has intercept zero because, under typical linear model
assumptions, both of the plotted variables have mean zero. The slope
of the fitted line is the coefficient that the new term would have
if it were added to the model with terms
Added variable plots are sometimes known as partial regression leverage plots.
Load the data in
hald.mat, which contains
observations of the heat of reaction of various cement mixtures:
load hald whos Name Size Bytes Class Attributes Description 22x58 2552 char hald 13x5 520 double heat 13x1 104 double ingredients 13x4 416 double
Create an added variable plot to investigate the addition of
the third column of
ingredients to a model consisting
of the first two columns:
inmodel = [true true false false]; addedvarplot(ingredients,heat,3,inmodel)
The wide scatter and the low slope of the fitted line are evidence against the statistical significance of adding the third column to the model.