An open API service indexing awesome lists of open source software.

https://github.com/rsquaredacademy/inferr

Parametric and non-parametric statistical tests
https://github.com/rsquaredacademy/inferr

inference inferential-statistics non-parametric parametric rstats statistical-tests

Last synced: about 2 months ago
JSON representation

Parametric and non-parametric statistical tests

Awesome Lists containing this project

README

        

---
output: github_document
---

```{r, echo = FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>",
fig.path = "README-"
)
```

# inferr

> Tools for Statistical Inference

[![CRAN\_Status\_Badge](https://www.r-pkg.org/badges/version/inferr)](https://cran.r-project.org/package=inferr) [![R-CMD-check](https://github.com/rsquaredacademy/inferr/actions/workflows/R-CMD-check.yaml/badge.svg)](https://github.com/rsquaredacademy/inferr/actions/workflows/R-CMD-check.yaml)
[![Coverage status](https://app.codecov.io/gh/rsquaredacademy/inferr/branch/master/graph/badge.svg)](https://app.codecov.io/github/rsquaredacademy/inferr?branch=master)

## Overview

inferr builds upon the statistical tests provided in **stats**, provides additional and flexible input options and more detailed and structured test results. As of version 0.3, **inferr** includes a select set of parametric and non-parametric statistical tests which are listed below:

- One Sample t Test
- Paired Sample t Test
- Independent Sample t Test
- One Sample Proportion Test
- Two Sample Proportion Test
- One Sample Variance Test
- Two Sample Variance Test
- Binomial Test
- ANOVA
- Chi Square Goodness of Fit Test
- Chi Square Independence Test
- Levene's Test
- Cochran's Q Test
- McNemar Test
- Runs Test for Randomness

## Installation

```{r cran-installation, eval = FALSE}
# install inferr from CRAN
install.packages("inferr")

# the development version from github
# install.packages("devtools")
devtools::install_github("rsquaredacademy/inferr")
```

## Articles

- [Introduction to inferr](https://inferr.rsquaredacademy.com/articles/intro.html)

## Usage

#### One Sample t Test

```{r load, echo=FALSE, message=FALSE}
library(inferr)
```

```{r infer1}
ifr_os_t_test(hsb, write, mu = 50, type = 'all')
```

#### ANOVA

```{r anova}
ifr_oneway_anova(hsb, write, prog)
```

#### Chi Square Test of Independence

```{r chi1}
ifr_chisq_assoc_test(hsb, female, schtyp)
```

#### Levene's Test

```{r lev1}
ifr_levene_test(hsb, read, group_var = race)
```

#### Cochran's Q Test

```{r cochran}
ifr_cochran_qtest(exam, exam1, exam2, exam3)
```

#### McNemar Test

```{r mc1}
hb <- hsb
hb$himath <- ifelse(hsb$math > 60, 1, 0)
hb$hiread <- ifelse(hsb$read > 60, 1, 0)
ifr_mcnemar_test(hb, himath, hiread)
```

## 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 inferr project is released with a [Contributor Code of Conduct](https://inferr.rsquaredacademy.com/CODE_OF_CONDUCT.html). By contributing to this project, you agree to abide by its terms.