Sha256: 58d9b5b8ecd93a3293cecea89854292e6d99bc852eef140ef4b3e14575e5fe2f

Contents?: true

Size: 876 Bytes

Versions: 11

Compression:

Stored size: 876 Bytes

Contents

#!/usr/bin/ruby
$:.unshift(File.dirname(__FILE__)+'/../lib/')
$:.unshift("/home/cdx/usr/lib/statsample-bivariate-extension/lib/")

require 'statsample'
Statsample::Analysis.store(Statsample::Bivariate::Polychoric) do 
ct=Matrix[[rand(10)+50, rand(10)+50,  rand(10)+1],
          [rand(20)+5,  rand(50)+4,   rand(10)+1],
          [rand(8)+1,   rand(12)+1,   rand(10)+1]]

# Estimation of polychoric correlation using two-step (default)
poly=polychoric(ct, :name=>"Polychoric with two-step", :debug=>false)
summary poly

# Estimation of polychoric correlation using joint method (slow)
poly=polychoric(ct, :method=>:joint, :name=>"Polychoric with joint")
summary poly

# Uses polychoric series (not recomended)

poly=polychoric(ct, :method=>:polychoric_series, :name=>"Polychoric with polychoric series")
summary poly
end
if __FILE__==$0
   Statsample::Analysis.run_batch
end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
statsample-1.5.0 examples/polychoric.rb
statsample-1.4.3 examples/polychoric.rb
statsample-1.4.2 examples/polychoric.rb
statsample-1.4.1 examples/polychoric.rb
statsample-1.4.0 examples/polychoric.rb
statsample-1.3.1 examples/polychoric.rb
statsample-1.3.0 examples/polychoric.rb
statsample-1.2.0 examples/polychoric.rb
statsample-1.1.0 examples/polychoric.rb
statsample-1.0.1 examples/polychoric.rb
statsample-1.0.0 examples/polychoric.rb