https://github.com/doches/ruby-regress
A command-line tool & Ruby class for computing Pearson's r and other stats
https://github.com/doches/ruby-regress
Last synced: over 1 year ago
JSON representation
A command-line tool & Ruby class for computing Pearson's r and other stats
- Host: GitHub
- URL: https://github.com/doches/ruby-regress
- Owner: doches
- License: mit
- Created: 2010-08-25T20:19:30.000Z (almost 16 years ago)
- Default Branch: master
- Last Pushed: 2012-04-17T12:02:43.000Z (over 14 years ago)
- Last Synced: 2024-04-25T10:21:09.647Z (about 2 years ago)
- Language: Ruby
- Homepage:
- Size: 105 KB
- Stars: 1
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.mdown
- License: LICENSE
Awesome Lists containing this project
README
# ruby-regress
### A partial drop-in replacement for |STAT's regress
`ruby-regress` is a tool for computing correlations and regression equations
from two-variable input. It is designed to function as a drop-in replacement
for Gary Perlman's `regress`, at least for those who use only the basic
functionality that `regress` provides.
## Why!?
The problem with Gary Perlman's excellent |STAT programs is twofold:
+ The only way of obtaining a copy is by emailing Perlman and asking for it.
+ The distribution of modified copies is [expressely forbidden](http://oldwww.acm.org/perlman/stat/history.html#conditions).
If you need bulletproof robustness you're probably better off dealing with Perlman's terms of access and using |STAT; if you want ease of installation, try `ruby-regress`.
## Installation
#### From rubygems
If you're using Gemcutter.org as a your gem host (hint: you almost certainly are) you can
install ruby-regress using rubygems:
gem install ruby-regress
which installs the `regress` executable.
#### From source
Download the most recent source from Github:
git clone git://github.com/doches/ruby-regress.git
then build and install the gem:
cd ruby-regress
rake build
sudo rake install
## Usage
ruby-regress installs a single command line tool called `regress`, which
reads from `STDIN` and prints a report containing the correlation coefficient,
plus some descriptive statistics, to `STDOUT`. For example, if we have a file in
the current directory called `data.txt` containing two datasets:
1 12.0
2 11.0
3 13.0
4 14.0
we can get the correlation coefficient between these two variables by:
cat data.txt | regress
which will dump a load of statistical information about the datasets to
the terminal.