Note: This page has been translated by MathWorks. Click here to see

To view all translated materials including this page, select Country from the country navigator on the bottom of this page.

To view all translated materials including this page, select Country from the country navigator on the bottom of this page.

Adjusted response plot of linear regression model

`plotAdjustedResponse(mdl,var)`

`plotAdjustedResponse(mdl,var,Name,Value)`

`h = plotAdjustedResponse(___)`

`plotAdjustedResponse(`

creates an adjusted response plot
for the variable `mdl`

,`var`

)`var`

in the linear regression model
`mdl`

.

`plotAdjustedResponse(`

specifies graphical properties of adjusted response data points using one or more
name-value pair arguments. For example, you can specify the marker symbol and size
for the data points.`mdl`

,`var`

,`Name,Value`

)

returns line objects using any of the input argument combinations in the previous
syntaxes. Use `h`

= plotAdjustedResponse(___)`h`

to modify the properties of a specific line
after you create the plot. For a list of properties, see Line Properties.

The data cursor displays the values of the selected plot point in a data tip (small text box located next to the data point). The data tip includes the

*x*-axis and*y*-axis values for the selected point, along with the observation name or number.

A

`LinearModel`

object provides multiple plotting functions.When creating a model, use

`plotAdded`

to understand the effect of adding or removing a predictor variable.When verifying a model, use

`plotDiagnostics`

to find questionable data and to understand the effect of each observation. Also, use`plotResiduals`

to analyze the residuals of the model.After fitting a model, use

`plotAdjustedResponse`

,`plotPartialDependence`

, and`plotEffects`

to understand the effect of a particular predictor. Use`plotInteraction`

to understand the interaction effect between two predictors. Also, use`plotSlice`

to plot slices through the prediction surface.

`plotPartialDependence`

creates either a line plot or a surface plot of predicted responses against a single feature or a pair of features, respectively, by marginalizing over the other variables. A line plot for a single feature from`plotPartialDependence`

and an adjusted response function plot from`plotAdjustedResponse`

are the same within numerical precision.`plotEffects`

creates a summary plot that shows separate effects for all predictors.`plotAdded`

shows the incremental effect on the response of specified terms by removing the effects of the other terms, whereas`plotAdjustedResponse`

shows the effect of a selected predictor in the model fit with the other predictors averaged out by averaging the fitted values. Note that the definitions of adjusted values in`plotAdded`

and`plotAdjustedResponse`

are not the same.

`LinearModel`

| `plotAdded`

| `plotEffects`

| `plotInteraction`

| `plotPartialDependence`