Questions tagged [statistics-bootstrap]

In statistics, a bootstrap is a resampling technique based on random sampling with replacement.

The bootstrap was introduced by Brad Efron in the Late 1970s. It is a computer‐intensive method that enables enables researchers to estimate the sample statistics (such as medians, variances, percentiles) by drawing randomly with replacement from a set of available data.

See also:

  1. The Wikipedia page on Bootstrapping
  2. Bootstrapping using boot package in R
  3. Brad Efron's paper on bootstrap
  4. Review on bootstrap methods in econometrics
602 questions
21
votes
1 answer

adjusted bootstrap confidence intervals (BCa) with parametric bootstrap in boot package

I am attempting to use boot.ci from R's boot package to calculate bias- and skew-corrected bootstrap confidence intervals from a parametric bootstrap. From my reading of the man pages and experimentation, I've concluded that I have to compute the…
Ben Bolker
  • 211,554
  • 25
  • 370
  • 453
15
votes
1 answer

How to bootstrap respecting within-subject information?

This is the first time I post to this forum, and I want to say from the start I am not a skilled programmer. So please let me know if the question or code were unclear! I am trying to get the 95% confidence interval (CI) for an interaction (that is…
Sol
  • 724
  • 1
  • 5
  • 18
15
votes
4 answers

Using R parallel to speed up bootstrap

I would like to speed up my bootstrap function, which works perfectly fine itself. I read that since R 2.14 there is a package called parallel, but I find it very hard for sb. with low knowledge of computer science to really implement it. Maybe…
tomka
  • 2,516
  • 7
  • 31
  • 45
14
votes
2 answers

bootstrapping hierarchical/multilevel data (resampling clusters)

I am producing a script for creating bootstrap samples from the cats dataset (from the -MASS- package). Following the Davidson and Hinkley textbook [1] I ran a simple linear regression and adopted a fundamental non-parametric procedure for…
Stefano Lombardi
  • 1,581
  • 2
  • 22
  • 48
12
votes
1 answer

Repeat the re-sampling function for 1000 times ? Using lapply?

Please me out! I appreciate any helps ! Thanks! I have trouble on repeat doing re-sampling for 1000 times. I tried using replicate() to do that but it's not working. Is there any other method to do that? Can anyone show me if this maybe done by…
user2978129
  • 191
  • 1
  • 3
  • 10
11
votes
5 answers

Block bootstrap from subject list

I'm trying to efficiently implement a block bootstrap technique to get the distribution of regression coefficients. The main outline is as follows. I have a panel data set, and say firm and year are the indices. For each iteration of the…
baha-kev
  • 3,029
  • 9
  • 33
  • 31
11
votes
1 answer

Python statistics package(s) for bootstrapping confidence intervals and non-parametric multiple dataset comparisons

I'm looking for a Python package that can compute either/both bootstrapped confidence intervals and perform non-parametric multiple dataset comparisons. Does anyone know of one?
Randy Olson
  • 3,131
  • 2
  • 26
  • 39
9
votes
5 answers

Which model to pick from K fold Cross Validation

I was reading about cross validation and about how it it is used to select the best model and estimate parameters , I did not really understand the meaning of it. Suppose I build a Linear regression model and go for a 10 fold cross validation, I…
8
votes
2 answers

boot() equivalent in python?

Is there an equivalent of boot and boot.ci in python? In R I would do library(boot) result <- boot(data,bootfun,10000) boot.ci(result)
HappyPy
  • 9,839
  • 13
  • 46
  • 68
8
votes
2 answers

Calculating 95% confidence intervals in quantile regression in R using rq function

I would like to get 95% confidence intervals for the regression coefficients of a quantile regression. You can calculate quantile regressions using the rq function of the quantreg package in R (compared to an OLS…
ehi
  • 409
  • 8
  • 23
8
votes
3 answers

R calculate the standard error using bootstrap

I have this array of values: > df [1] 2 0 0 2 2 0 0 1 0 1 2 1 0 1 3 0 0 1 1 0 0 0 2 1 2 1 3 1 0 0 0 1 1 2 0 1 3 [38] 1 0 2 1 1 2 2 1 2 2 2 1 1 1 2 1 0 0 0 0 0 0 0 0 0 0 1 0 1 1 0 1 0 0 0 0 0 [75] 0 0 0 0 0 1 1 0 1 1 1 1 3 1 3 0 1 2 2 1 2 3 1 0 0…
Vahid Mirjalili
  • 6,211
  • 15
  • 57
  • 80
8
votes
1 answer

Singular gradient error during bootstrapped nls fit to bad data

I have a dataset containing an independent variable and a set of dependent variables. I'd like to fit a function to each set of independent variables, using a bootstrapped nonlinear least squares procedure. In some cases, the independent variables…
Drew Steen
  • 16,045
  • 12
  • 62
  • 90
7
votes
2 answers

Bootstrapping a vector of results, by group in R

Question: How can I use a boostrap to get confidence intervals for a collection of statistics calculated on the eigenvalues of covariance matrices, separately for each group (factor level) in a data frame? Problem: I can't quite work out the…
user101089
  • 3,756
  • 1
  • 26
  • 53
7
votes
1 answer

Bootstrap Confidence Intervals for more than one statistics through boot.ci function

I want to get bootstrap confidence intervals for more than one statistics through boot.ci function. Here is my MWE. I've two statistics in out and want to find the bootstrap confidence intervals for these two statistics. However, boot.ci function is…
MYaseen208
  • 22,666
  • 37
  • 165
  • 309
7
votes
1 answer

Fast(er) way of indexing matrix in R

Foremost, I am looking for a fast(er) way of subsetting/indexing a matrix many, many times over: for (i in 1:99000) { subset.data <- data[index[, i], ] } Background: I'm implementing a sequential testing procedure involving the bootstrap in R.…
Niels
  • 81
  • 5
1
2 3
40 41