https://github.com/rsquaredacademy/olsrr
Tools for developing OLS regression models
https://github.com/rsquaredacademy/olsrr
collinearity-diagnostics linear-models regression rstats stepwise-regression
Last synced: 8 months ago
JSON representation
Tools for developing OLS regression models
- Host: GitHub
- URL: https://github.com/rsquaredacademy/olsrr
- Owner: rsquaredacademy
- License: other
- Created: 2016-11-28T17:58:45.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2025-06-18T11:52:47.000Z (12 months ago)
- Last Synced: 2025-09-26T10:43:27.981Z (9 months ago)
- Topics: collinearity-diagnostics, linear-models, regression, rstats, stepwise-regression
- Language: R
- Homepage: https://olsrr.rsquaredacademy.com/
- Size: 33 MB
- Stars: 102
- Watchers: 6
- Forks: 23
- Open Issues: 19
-
Metadata Files:
- Readme: README.Rmd
- Changelog: NEWS.md
- Contributing: CONTRIBUTING.MD
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
- Support: SUPPORT.md
Awesome Lists containing this project
README
---
output: github_document
---
```{r, echo = FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>",
fig.path = "README-"
)
```
# olsrr
[](https://cran.r-project.org/package=olsrr)
[](https://github.com/rsquaredacademy/olsrr/actions)
[](https://app.codecov.io/github/rsquaredacademy/olsrr?branch=master)
## Overview
The olsrr package provides following tools for building OLS regression models using R:
- Comprehensive Regression Output
- Variable Selection Procedures
- Heteroskedasticity Tests
- Collinearity Diagnostics
- Model Fit Assessment
- Measures of Influence
- Residual Diagnostics
- Variable Contribution Assessment
## Installation
```{r cran-installation, eval = FALSE}
# Install release version from CRAN
install.packages("olsrr")
# Install development version from GitHub
# install.packages("pak")
pak::pak("rsquaredacademy/olsrr")
```
## Articles
- [Quick Overview](https://olsrr.rsquaredacademy.com/articles/intro.html)
- [Variable Selection Methods](https://olsrr.rsquaredacademy.com/articles/variable_selection.html)
- [Residual Diagnostics](https://olsrr.rsquaredacademy.com/articles/residual_diagnostics.html)
- [Heteroskedasticity](https://olsrr.rsquaredacademy.com/articles/heteroskedasticity.html)
- [Measures of Influence](https://olsrr.rsquaredacademy.com/articles/influence_measures.html)
- [Collinearity Diagnostics](https://olsrr.rsquaredacademy.com/articles/regression_diagnostics.html)
## Usage
```{r, echo=FALSE, message=FALSE}
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
```{r regress}
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](https://reprex.tidyverse.org/index.html) on github. For questions and clarifications,
use [StackOverflow](https://stackoverflow.com/).
## Code of Conduct
Please note that the olsrr project is released with a [Contributor Code of Conduct](https://olsrr.rsquaredacademy.com/CODE_OF_CONDUCT.html). By contributing to this project, you agree to abide by its terms.