Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

ols_plot_reg_line

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.

Deprecated Function

ols_reg_line() has been deprecated. Instead use ols_plot_reg_line().

Examples

ols_plot_reg_line(mtcars$mpg, mtcars$disp)

olsrr

Tools for Building OLS Regression Models

v0.5.3
MIT + file LICENSE
Authors
Aravind Hebbali [aut, cre]
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.