-
Notifications
You must be signed in to change notification settings - Fork 8
/
README.Rmd
115 lines (83 loc) · 3.19 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
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
---
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-"
)
```
# inferr
> Tools for Statistical Inference
<!-- badges: start -->
[![CRAN\_Status\_Badge](https://www.r-pkg.org/badges/version/inferr)](https://cran.r-project.org/package=inferr) [![cran checks](https://cranchecks.info/badges/summary/inferr)](https://cran.r-project.org/web/checks/check_results_inferr.html)
[![R build status](https://github.com/rsquaredacademy/inferr/workflows/R-CMD-check/badge.svg)](https://github.com/rsquaredacademy/inferr/actions)
[![Coverage status](https://codecov.io/gh/rsquaredacademy/inferr/branch/master/graph/badge.svg)](https://codecov.io/github/rsquaredacademy/inferr?branch=master)
[![status](https://tinyverse.netlify.com/badge/inferr)](https://CRAN.R-project.org/package=inferr) [![Lifecycle: stable](https://img.shields.io/badge/lifecycle-stable-brightgreen.svg)](https://lifecycle.r-lib.org/articles/stages.html) [![](https://cranlogs.r-pkg.org/badges/grand-total/inferr)](https://cran.r-project.org/package=inferr)
<!-- badges: end -->
## 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}
infer_os_t_test(hsb, write, mu = 50, type = 'all')
```
#### ANOVA
```{r anova}
infer_oneway_anova(hsb, write, prog)
```
#### Chi Square Test of Independence
```{r chi1}
infer_chisq_assoc_test(hsb, female, schtyp)
```
#### Levene's Test
```{r lev1}
infer_levene_test(hsb, read, group_var = race)
```
#### Cochran's Q Test
```{r cochran}
infer_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)
infer_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 this project is released with a [Contributor Code of Conduct](CONDUCT.md). By participating in this project you agree to abide by its terms.