plot.maars_lm: Plot 'maars_lm, lm' object

Description Usage Arguments Value Examples

Description

Plot maars_lm, lm object

Usage

1
2
## S3 method for class 'maars_lm'
plot(x, which = NULL, ...)

Arguments

x

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

which

(numeric vector) : if a subset of the plots is required, specify a subset of the numbers 1:6.

...

Additional arguments passed to methods.

Value

TODO: Describe plots

Examples

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

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

# Let's generate data and fit a well-specified OLS data and model ----
y <- 2 + X_1 * 1 + X_2 * 5 + eps
lm_fit <- stats::lm(y ~ X_1 + X_2)
summary(lm_fit)

# Fit our first maars_lm object i.e. comp_var1
comp_var1 <- comp_var(
  mod_fit = lm_fit,
  boot_emp = list(B = 50, m = 200),
  boot_res = NULL,
  boot_mul = list(B = 60)
)

# Plot our maars_lm object
plot(comp_var1)

## End(Not run)

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