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
0
votes
0 answers

Non normal distribution - bootstrap normalicy?

More of a stats question. I have a non normal distribution of data. The data seems to fit the 10th to 90th percentile well while leaving out the outliers. I decided to bootstrap and got a tighter interval (n is decent 48) for a 95 percent CI. Should…
0
votes
0 answers

How to bootstrap non-stationary time series package R

I'm trying to build bootstrapped confidence intervals for a correlation coefficient between two non-stationary time series in R. I'm currently using the moving blocks bootstrapping method from the tsboot package, but I read that it is actually not…
0
votes
1 answer

boot.ci() can't compute confidence intervals for F1 score

I am trying to compute confidence intervals for F1 score using the boot package in R. But it doesn't seem to work and I am not sure why. library(MLmetrics) fci<-function(data,indices,x,y){ d<-data[indices,] r<-F1_Score(x,y) …
0
votes
0 answers

Select Shock Size and Sign in Impulse Response Functions

After running a VAR with 9 variables, I'm simply trying to obtain my impulse response functions through the irf() function. However, I need to select the size of the shock as well its sign. I know that this function from the VARS package uses by…
jc1998
  • 1
  • 1
0
votes
0 answers

R - bootstrapping with control for age and gender

I have a very unbalanced dataset ,, thousands of healthy participants and 21 patients (16 male and 5 female) ,, I want to use bootstrapping to define a new sampler but with control of age and gender. this is the method i'm…
EA90
  • 23
  • 5
0
votes
1 answer

How to use the std error from the boot programmatically?

In R, I can use the boot function (from here) to calculate some estimate of a statistic. How can I read the std.error or that estimate into an R variable from the output of the boot function? Take this simple example using the Boston data set from…
Hakan Baba
  • 1,897
  • 4
  • 21
  • 37
0
votes
1 answer

Error in z[, 1] : incorrect number of dimensions when doing bootstrapping samples

I am using a ratio of means to estimate the population, T = mean(xbar)/ mean(u_bar) using bootstrapping method and I'm getting this error message, Error in z[, 1] : incorrect number of dimensions. pop = read_xlsx("US_pop.xlsx") attach(pop) z =…
0
votes
2 answers

How to repeat a certain command (BOOTSTRAP RESAMPLING) with Python

I have a dataframe (length 4 data points) and want to do a Bootstrap X times. DATA FRAME EXAMPLE: Index A B 0 1 2 1 1 2 2 1 2 3 1 2 I figured out this code for…
0
votes
0 answers

How can I achieve hierarchical clustering with p-values for a large dataset?

I am trying to carry out hierarchical cluster analysis (based on Ward's method) on a large dataset (thousands of records and 13 variables) representing multi-species observations of marine predators, to identify possible significant clusters in…
0
votes
1 answer

Creating a bootstrap sample by group in python

I have a dataframe looking something like that: y X1 X2 X3 ID year 1 2010 1 2 3 4 1 2011 3 4 5 6 2 2010 1 2 3 4 2 2011 3 4 5 6 2 2012 7 8 9 10 ... I'd like to create several bootstrap sample from…
TiTo
  • 833
  • 2
  • 7
  • 28
0
votes
0 answers

Bootstrap p value confidence intervals for planned contrasts on an lmer object

does anyone know how to bootstrap confidence intervals for p-values of an lmer object (lmer and glmer as well) from lme4? Maybe via bootMer? I am doing planned/ one sided contrasts but all I can find are intervals for pairwise contrasts. Am glad…
0
votes
0 answers

How to run a bootstrap average over a table of variables in python?

I am wondering how to run a bootstrap average code over a table of values where each column needs to be bootstrapped individually? And then what would be especially helpful is if the output of results could be output into another table that…
0
votes
1 answer

Initializing np.empty() issues when doing bootstrapping in python unexpected output

I am a beginner in python and doing some learning on statistics! Facing issues with some functions that helps to bootstrap a data array for n times and ouput the mean values per bootstrap in the array. Thanks for the help in advance! import numpy as…
0
votes
1 answer

Best way to write bootstrapping in python

I was programming a method that applied statistical bootstrapping over a sample in python, and I have come with two solutions, one which is fully vectorized, and other that uses list comprehension. import seaborn as sns import numpy as np import…
0
votes
2 answers

R BootStrap With Strata

I learned how to do bootstrap regression. Here is my example and Code. library(boot) sampledata = data.frame(y = sample(0:20, r = T, size = 5000), x1 = runif(5000), x2 = runif(5000), …
bvowe
  • 3,004
  • 3
  • 16
  • 33