Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/lukem512/anova
Analysis of Variance (ANOVA)
https://github.com/lukem512/anova
analysis anova degrees-of-freedom f-value mean-squared statistics sum-of-squares variance
Last synced: about 1 month ago
JSON representation
Analysis of Variance (ANOVA)
- Host: GitHub
- URL: https://github.com/lukem512/anova
- Owner: lukem512
- Created: 2016-04-14T16:00:14.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2017-07-31T11:43:58.000Z (over 7 years ago)
- Last Synced: 2024-11-06T18:08:35.854Z (about 2 months ago)
- Topics: analysis, anova, degrees-of-freedom, f-value, mean-squared, statistics, sum-of-squares, variance
- Language: JavaScript
- Homepage: https://www.npmjs.com/package/anova
- Size: 5.86 KB
- Stars: 11
- Watchers: 3
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# ANOVA
[![Build Status](https://travis-ci.org/lukem512/anova.svg?branch=master)](https://travis-ci.org/lukem512/anova) ![Build Status](https://david-dm.org/lukem512/anova.svg) [![npm](https://img.shields.io/npm/l/anova.svg)](https://www.npmjs.com/package/anova) [![npm](https://img.shields.io/npm/v/anova.svg)](https://www.npmjs.com/package/anova) [![npm](https://img.shields.io/npm/dm/anova.svg)](https://www.npmjs.com/package/anova)
An NPM module providing the *Analysis of Variance* (ANOVA) parametric statistical test. When performing ANOVA, individual observations (values) are grouped into treatments (samples, arrays of values). The analysis is performed on an array of treatments and results in an F-value. Additional values, such as the Sum of Squares, can be computed using the functions described below.
To use it, simply [install via NPM](https://www.npmjs.com/package/anova/tutorial) and include it in your project file.
```js
var anova = require('anova');
```To compute the F-test of an array of samples use the `test` function:
```js
var samples = [[3,3,5,1], [1,2,3]];
console.log(anova.test(samples)); // 0.8571428571428572
```To compute the Sum of Squares use the `SS` function:
```js
var ss = anova.SS(samples);
console.log('The between treatments SS is:', ss.treatments);
console.log('The error or residual SS is:', ss.residual);
console.log('The total SS is:', ss.total);
```To compute the Degrees of Freedom use the `DF` function:
```js
var df = anova.DF(samples);
console.log('The between treatments DF is:', df.treatments);
console.log('The error or residual DF is:', df.residual);
console.log('The total DF is:', df.total);
```To compute the Mean Squared use the `MS` function:
```js
var ms = anova.MS(samples);
console.log('The between treatments MS is:', ms.treatments);
console.log('The error or residual MS is:', ms.residual);
```### Related Modules
- [brown-forsythe-test](https://github.com/lukem512/brown-forsythe-test)
- [levene-test](https://github.com/lukem512/levene-test)
- [mann-whitney-utest](https://github.com/lukem512/mann-whitney-utest)
- [statistical-methods](https://github.com/lukem512/statistical-methods)### License
MIT © Luke Mitchell