ols_plot_reg_line: Simple linear regression line

View source: R/ols-fitted-line-properties.R

ols_plot_reg_lineR Documentation

Simple linear regression line

Description

Plot to demonstrate that the regression line always passes through mean of the response and predictor variables.

Usage

ols_plot_reg_line(response, predictor, print_plot = TRUE)

Arguments

response

Response variable.

predictor

Predictor variable.

print_plot

logical; if TRUE, prints the plot else returns a plot object.

Examples

ols_plot_reg_line(mtcars$mpg, mtcars$disp)


olsrr documentation built on May 29, 2024, 12:35 p.m.