Learn R Programming

api2lm (version 0.2)

arg_check_index_plot_lm: Check arguments of residual_plot.lm

Description

Check arguments of residual_plot.lm

Usage

arg_check_index_plot_lm(
  model,
  stat,
  id_n,
  add_reference,
  text_arglist,
  abline_arglist,
  extendrange_f
)

Arguments

model

A fitted model object from the lm function.

stat

A function that can be applied to an lm object and returns a vector of observations for each observation used to fit the model.

id_n

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

add_reference

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

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.