dfbeta_plot {api2lm}R Documentation

dfbeta index plots

Description

dfbeta_plot creates an index plot of the dfbeta statistics for each regressor.

Usage

dfbeta_plot(
  model,
  id_n = 3,
  regressors = ~.,
  add_reference = TRUE,
  ...,
  text_arglist = list(),
  abline_arglist = list(),
  extendrange_f = 0.08
)

Arguments

model

A fitted model object from the lm function.

id_n

The number of points to identify with labels. The default is 3.

regressors

A formula describing the regressors for which to plot the dfbetas statistics. The default is all available regressors.

add_reference

A logical value indicating whether a reference line should be added. The default is TRUE.

...

Additional arguments passed to the plot function.

text_arglist

Additional arguments passed to the text function, which is used to display the points that are identified.

abline_arglist

A named list specifying additional arguments passed to the abline function for the horizontal reference line added to the plot.

extendrange_f

Positive number(s) specifying the fraction by which the range of the residuals should be extended using the extendrange function. If longer than one, f[1] is used on the left and f[2] on the right.

Details

A horizontal reference line is added at +/- the estimated standard error of each coefficient by default if add_reference is TRUE.

Author(s)

Joshua French

See Also

plot, text, abline dfbeta.

Examples

lmod <- lm(murder ~ hs_grad + urban + poverty + single,
           data = crime2009)
dfbeta_plot(lmod)
dfbeta_plot(lmod, regressors = ~ hs_grad + poverty,
            id_n = 1)

[Package api2lm version 0.2 Index]