Forum: Ruby statsample: A statistical package for ruby

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Claudio B. (Guest)
on 2010-02-22 20:04
Hi, everyone:

I like to invite you all to test and give some feedback on my ruby
statistical package "statsample"

The home URL is:

http://ruby-statsample.rubyforge.org/

and you can install it with

gem install statsample


Have descriptive and inferencial statistical tools, including Multiple,
Logit and Probit Regression, PCA, Factor Analysis, Tetrachoric and
Polychoric correlation.

I implement the algorithms according to my needs and time, so if you
need something, you ask and I try to implement it.


For example, to do a Multiple Regression Analysis you could do


require 'statsample'

samples=10000
a=samples.times.collect {rand}.to_scale
b=samples.times.collect {rand}.to_scale
c=samples.times.collect {rand}.to_scale
d=samples.times.collect {rand}.to_scale

ds={'a'=>a,'b'=>b,'c'=>c,'d'=>d}.to_dataset
ds['y']=ds.collect{|row|
row['a']*5+row['b']*3+row['c']*2+row['d']*1+rand()}
lr=Statsample::Regression::Multiple::RubyEngine.new(ds,'y')
puts lr.summary
This topic is locked and can not be replied to.