knitr::opts_chunk$set(
  collapse = TRUE,
  comment = "#>",
  fig.path = "README-"
)

olsrr

CRAN_Status_Badge R build status Coverage status

Overview

The olsrr package provides following tools for building OLS regression models using R:

Installation

# Install release version from CRAN
install.packages("olsrr")

# Install development version from GitHub
# install.packages("pak")
pak::pak("rsquaredacademy/olsrr")

Articles

Usage

library(olsrr)
library(dplyr)
library(ggplot2)
library(gridExtra)
library(nortest)
library(goftest)

olsrr uses consistent prefix ols_ for easy tab completion. If you know how to write a formula or build models using lm, you will find olsrr very useful. Most of the functions use an object of class lm as input. So you just need to build a model using lm and then pass it onto the functions in olsrr. Below is a quick demo:

Regression

model <- lm(mpg ~ disp + hp + wt + qsec, data = mtcars)
ols_regress(model)

Getting Help

If you encounter a bug, please file a minimal reproducible example using reprex on github. For questions and clarifications, use StackOverflow.

Code of Conduct

Please note that the olsrr project is released with a Contributor Code of Conduct. By contributing to this project, you agree to abide by its terms.



rsquaredacademy/olsrr documentation built on Nov. 8, 2024, 5:01 a.m.