Class/Module Index [+]

Quicksearch

Statsample::Shorthand

Module which provide shorthands for many methods.

Public Class Methods

rnorm(n,mean=0,sd=1) click to toggle source

Random generation for the normal distribution

# File lib/statsample/shorthand.rb, line 33
def rnorm(n,mean=0,sd=1)
  rng=Distribution::Normal.rng(mean,sd)
  Statsample::Vector.new_scale(n) { rng.call}
end
test_u(*args) click to toggle source
# File lib/statsample/shorthand.rb, line 96
def test_u(*args)
  Statsample::Test::UMannWhitney.new(*args)
end

Public Instance Methods

boxplot(*args) click to toggle source

Returns a Statsample::Graph::Boxplot

# File lib/statsample/shorthand.rb, line 45
def boxplot(*args)
  Statsample::Graph::Boxplot.new(*args)
end
c(*args) click to toggle source

Create a Statsample::Vector Analog to R’s c

# File lib/statsample/shorthand.rb, line 29
def c(*args)
  Statsample::Vector[*args]
end
cor(ds) click to toggle source

Create a correlation matrix from a dataset

# File lib/statsample/shorthand.rb, line 20
def cor(ds)
  Statsample::Bivariate.correlation_matrix(ds)
end
cov(ds) click to toggle source

Create a variance/covariance matrix from a dataset

# File lib/statsample/shorthand.rb, line 24
def cov(ds)
  Statsample::Bivariate.covariate_matrix(ds)
end
data_frame(vectors=Hash.new) click to toggle source
Alias for: dataset
dataset(vectors=Hash.new) click to toggle source

Creates a new Statsample::Dataset Each key is transformed into string

# File lib/statsample/shorthand.rb, line 39
def dataset(vectors=Hash.new)
  vectors=vectors.inject({}) {|ac,v| ac[v[0].to_s]=v[1];ac}
  Statsample::Dataset.new(vectors)
end
Also aliased as: data_frame
dominance_analysis(*args) click to toggle source
# File lib/statsample/shorthand.rb, line 81
def dominance_analysis(*args)
  Statsample::DominanceAnalysis.new(*args)
end
dominance_analysis_bootstrap(*args) click to toggle source
# File lib/statsample/shorthand.rb, line 84
def dominance_analysis_bootstrap(*args)
  Statsample::DominanceAnalysis::Bootstrap.new(*args)
end
histogram(*args) click to toggle source

Returns a Statsample::Graph::Histogram

# File lib/statsample/shorthand.rb, line 49
def histogram(*args)
  Statsample::Graph::Histogram.new(*args)
end
levene(*args) click to toggle source

Returns a Statsample::Test::Levene

# File lib/statsample/shorthand.rb, line 58
def levene(*args)
  Statsample::Test::Levene.new(*args)
end
lr(*args) click to toggle source

Other Shortcuts

# File lib/statsample/shorthand.rb, line 75
def lr(*args)
  Statsample::Regression.multiple(*args)
end
multiscale_analysis(*args,&block) click to toggle source
# File lib/statsample/shorthand.rb, line 93
def multiscale_analysis(*args,&block)
  Statsample::Reliability::MultiScaleAnalysis.new(*args,&block)
end
names(ds) click to toggle source

Retrieve names (fields) from dataset

# File lib/statsample/shorthand.rb, line 16
def names(ds)
  ds.fields
end
pca(ds,opts=Hash.new) click to toggle source
# File lib/statsample/shorthand.rb, line 78
def pca(ds,opts=Hash.new)
  Statsample::Factor::PCA.new(ds,opts)
end
polychoric(*args) click to toggle source
# File lib/statsample/shorthand.rb, line 65
def polychoric(*args)
  Statsample::Bivariate::Polychoric.new(*args)
end
principal_axis(*args) click to toggle source
# File lib/statsample/shorthand.rb, line 61
def principal_axis(*args)
  Statsample::Factor::PrincipalAxis.new(*args)
  
end
scale_analysis(*args) click to toggle source
# File lib/statsample/shorthand.rb, line 87
def scale_analysis(*args)
  Statsample::Reliability::ScaleAnalysis.new(*args)
end
scatterplot(*args) click to toggle source

Returns a Statsample::Graph::Scatterplot

# File lib/statsample/shorthand.rb, line 54
def scatterplot(*args)
  Statsample::Graph::Scatterplot.new(*args)
end
skill_scale_analysis(*args) click to toggle source
# File lib/statsample/shorthand.rb, line 90
def skill_scale_analysis(*args)
  Statsample::Reliability::SkillScaleAnalysis.new(*args)
end
tetrachoric(*args) click to toggle source
# File lib/statsample/shorthand.rb, line 68
def tetrachoric(*args)
  Statsample::Bivariate::Tetrachoric.new(*args)
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.