statsample: A statistical package for ruby

C

Claudio Bustos

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,770
Messages
2,569,583
Members
45,074
Latest member
StanleyFra

Latest Threads

Top