Parent

Class/Module Index [+]

Quicksearch

Statsample::Regression::Multiple::MultipleDependent

Public Class Methods

new(matrix,y_var, opts=Hash.new) click to toggle source
# File lib/statsample/regression/multiple.rb, line 53
def initialize(matrix,y_var, opts=Hash.new)
  matrix.extend Statsample::CovariateMatrix
  @matrix=matrix
  @fields=matrix.fields-y_var
  @y_var=y_var
  @q=@y_var.size
  @matrix_cor=matrix.correlation
  @matrix_cor_xx = @matrix_cor.submatrix(@fields)
  @matrix_cor_yy = @matrix_cor.submatrix(y_var, y_var)
  
  @sxx = @matrix.submatrix(@fields)
  @syy = @matrix.submatrix(y_var, y_var)
  @sxy = @matrix.submatrix(@fields, y_var)
  @syx = @sxy.t
end

Public Instance Methods

p2yx() click to toggle source
# File lib/statsample/regression/multiple.rb, line 83
def p2yx
  vxy.quo(@q)
end
r2yx() click to toggle source
# File lib/statsample/regression/multiple.rb, line 69
def r2yx
  1- (@matrix_cor.determinant.quo(@matrix_cor_yy.determinant * @matrix_cor_xx.determinant))
end
r2yx_covariance() click to toggle source
# File lib/statsample/regression/multiple.rb, line 76
def r2yx_covariance
  1-(syyx.determinant.quo(@syy.determinant))
end
significance() click to toggle source
# File lib/statsample/regression/multiple.rb, line 50
def significance
  0.0
end
syyx() click to toggle source

Residual covariance of Y after accountin with lineal relation with x

# File lib/statsample/regression/multiple.rb, line 73
def syyx
  @syy-@syx*@sxx.inverse*@sxy
end
vxy() click to toggle source
# File lib/statsample/regression/multiple.rb, line 80
def vxy
  @q-(@syy.inverse*syyx).trace
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.