-
Notifications
You must be signed in to change notification settings - Fork 23
/
README.Rmd
85 lines (64 loc) · 2.8 KB
/
README.Rmd
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
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
---
output: github_document
---
<!-- README.md is generated from README.Rmd. Please edit that file -->
```{r, echo = FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>",
fig.path = "README-"
)
```
# olsrr
<!-- badges: start -->
[![CRAN_Status_Badge](https://www.r-pkg.org/badges/version/olsrr)](https://cran.r-project.org/package=olsrr)
[![R build status](https://github.com/rsquaredacademy/olsrr/workflows/R-CMD-check/badge.svg)](https://github.com/rsquaredacademy/olsrr/actions)
[![Coverage status](https://codecov.io/gh/rsquaredacademy/olsrr/branch/master/graph/badge.svg)](https://app.codecov.io/github/rsquaredacademy/olsrr?branch=master)
<!-- badges: end -->
## 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.