def bootstrap(estimators, nr, s=nil)
      s ||= size
      h_est, es, bss = prepare_bootstrap(estimators)

      nr.times do
        bs = sample_with_replacement(s)
        es.each do |estimator|
          bss[estimator].push(h_est[estimator].call(bs))
        end
      end

      es.each do |est|
        bss[est] = Daru::Vector.new bss[est]
      end

      Daru::DataFrame.new bss
    end
def bootstrap(estimators, nr, s=nil)
      s ||= size
      h_est, es, bss = prepare_bootstrap(estimators)

      nr.times do
        bs = sample_with_replacement(s)
        es.each do |estimator|
          bss[estimator].push(h_est[estimator].call(bs))
        end
      end

      es.each do |est|
        bss[est] = Daru::Vector.new bss[est]
      end

      Daru::DataFrame.new bss
    end
Duplicated a vector
 @return [Daru::Vector] duplicated vector
 == Bootstrap
 Generate +nr+ resamples (with replacement) of size  +s+
 from vector, computing each estimate from +estimators+
 over each resample.
 +estimators+ could be
 a) Hash with variable names as keys and lambdas as  values
   a.bootstrap(:log_s2=>lambda {|v| Math.log(v.variance)},1000)
 b) Array with names of method to bootstrap
   a.bootstrap([:mean, :sd],1000)
 c) A single method to bootstrap
   a.jacknife(:mean, 1000)
 If s is nil, is set to vector size by default.

 Returns a DataFrame where each vector is a vector
 of length +nr+ containing the computed resample estimates.