def jackknife(estimators, k=1) # rubocop:disable Metrics/AbcSize,Metrics/MethodLength
      raise "n should be divisible by k:#{k}" unless (size % k).zero?

      nb = (size / k).to_i
      h_est, es, ps = prepare_bootstrap(estimators)

      est_n = es.map { |v| [v, h_est[v].call(self)] }.to_h

      nb.times do |i|
        other = @data.dup
        other.slice!(i*k, k)
        other = Daru::Vector.new other

        es.each do |estimator|
          # Add pseudovalue
          ps[estimator].push(
            nb * est_n[estimator] - (nb-1) * h_est[estimator].call(other)
          )
        end
      end

      es.each do |est|
        ps[est] = Daru::Vector.new ps[est]
      end
      Daru::DataFrame.new ps
    end
== 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.