get_plot: Get a list of standard diagnostic plots for 'lm', in the...

Description Usage Arguments Value Examples

View source: R/ols-diag-plot.R

Description

Get a list of standard diagnostic plots for lm, in the link[ggplot2] package style.

Usage

1
get_plot(mod_fit)

Arguments

mod_fit

(maars_lm, lm) A fitted OLS maars_lm, lm class object

Value

A list of standard diagnostic plots for OLS in the link[ggplot2] package style.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
## Not run: 
set.seed(1243434)

# generate data
n <- 1e3
X_1 <- stats::rnorm(n, 0, 1)
X_2 <- stats::rnorm(n, 10, 20)
eps <- stats::rnorm(n, 0, 1)

# OLS data and model
y <- 2 + X_1 * 1 + X_2 * 5 + eps
lm_fit <- stats::lm(y ~ X_1 + X_2)
mms_fit <- lm_fit %>% comp_var(
  mod_fit = .,
  boot_emp = list(B = 100, m = 50),
  boot_res = list(B = 50)
)

# Produce and sequentially display diagnostic plots
plot(mms_fit)

## End(Not run)

shamindras/maars documentation built on Sept. 21, 2021, 2:50 a.m.