daru

https://github.com/sciruby/daru

Ruby

Data Analysis in RUby

Daru::Vector#jackknife

== Jacknife
Returns a dataset with jacknife delete-+k+ +estimators+
+estimators+ could be:
a) Hash with variable names as keys and lambdas as values
  a.jacknife(:log_s2=>lambda {|v| Math.log(v.variance)})
b) Array with method names to jacknife
  a.jacknife([:mean, :sd])
c) A single method to jacknife
  a.jacknife(:mean)
+k+ represent the block size for block jacknife. By default
is set to 1, for classic delete-one jacknife.

Returns a dataset where each vector is an vector
of length +cases+/+k+ containing the computed jacknife estimates.

== Reference:
* Sawyer, S. (2005). Resampling Data: Using a Statistical Jacknife.

Source | Google | Stack overflow

Edit

git clone [email protected]:sciruby/daru.git

cd daru

open lib/daru/vector.rb

Contribute

# Make a new branch

git checkout -b -your-name--update-docs-Daru--Vector-jackknife-for-pr


# Commit to git

git add lib/daru/vector.rbgit commit -m "better docs for Daru::Vector#jackknife"


# Open pull request

gem install hub # on a mac you can `brew install hub`

hub fork

git push <your name> -your-name--update-docs-Daru--Vector-jackknife-for-pr

hub pull-request


# Celebrate!