# av.plots

From car v1.2-16
by John Fox

##### Added-Variable Plots

These functions construct added-variable (also called partial-regression) plots for linear and generalized linear models.

- Keywords
- hplot, regression

##### Usage

```
av.plots(model, variable, ask=missing(variable), one.page=!ask, ...)
avp(...)
av.plot(model, ...)
## S3 method for class 'lm':
av.plot(model, variable,
labels=names(residuals(model)[!is.na(residuals(model))]),
identify.points=TRUE, las=par("las"), col=palette()[2], pch=1, lwd=2,
main="Added-Variable Plot", ...)
## S3 method for class 'glm':
av.plot(model, variable,
labels=names(residuals(model)[!is.na(residuals(model))]),
identify.points=TRUE, las=par("las"), col=palette()[2], pch=1, lwd=2,
main="Added-Variable Plot", type=c("Wang", "Weisberg"), ...)
```

##### Arguments

- model
- model object produced by
`lm`

or`glm`

. - variable
- variable (if it exists in the search path) or
name of variable. This argument usually is omitted for
`avp`

or`av.plots`

. - ask
- if
`TRUE`

, a menu is provided in the R Console for the user to select the term(s) to plot. - one.page
- if
`TRUE`

(and`ask=FALSE`

), put all plots on one graph. - labels
- observation names.
- identify.points
- if
`TRUE`

, then identify points interactively. - las
- if
`0`

, ticks labels are drawn parallel to the axis; set to`1`

for horizontal labels (see`par`

). - col
- color for points and lines; the default is the
*second*entry in the current color palette (see`palette`

and`par`

). - pch
- plotting character for points; default is
`1`

(a circle, see`par`

). - lwd
- line width; default is
`2`

(see`par`

). - main
- title for plot.
- type
- if
`"Wang"`

use the method of Wang (1985); if`"Weisberg"`

use the method in the Arc software associated with Cook and Weisberg (1999). - ...
- arguments to be passed down to
`av.plot.lm`

or`av.plot.glm`

.

##### Details

The function intended for direct use is `av.plots`

(for which `avp`

is an abbreviation). By default, these functions are used interactively
through a text menu.
The model can contain factors and interactions. An added-variable plot can be
drawn for each column of the model matrix, including the constant.

##### Value

`NULL`

. These functions are used for their side effect: producing plots.

##### References

Cook, R. D. and Weisberg, S. (1999)
*Applied Regression, Including Computing and Graphics.* Wiley.
Fox, J. (1997)
*Applied Regression, Linear Models, and Related Methods.* Sage.
Wang, P C. (1985)
Adding a variable in generalized linear models.
*Technometrics* **27**, 273--276.

##### See Also

##### Examples

```
av.plots(lm(prestige~income+education+type, data=Duncan))
av.plots(glm(partic != "not.work" ~ hincome + children,
data=Womenlf, family=binomial))
```

*Documentation reproduced from package car, version 1.2-16, License: GPL (>= 2)*

### Community examples

Looks like there are no examples yet.