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
1 answer

R: Taking the mean of an element in data frames contained in a list

I've assembled a list of data frames that contain the coefficients of nls. This is part of a custom bootstrapping (actually, bagging) method. I'd like to calculate the mean of each of the parameters in the data frames. After sampling xdata and…
H Ludwig
  • 83
  • 7
0
votes
0 answers

Bootstrap p value significantly different from t-test p value

I am trying to figure out whether there is significant difference between two sample sets by calculating the p-value through bootstrapping and the t-test. However, I get p = 0.49 when I do bootstrapping and 7.015e-11 when I use the t-test. I'm quite…
soapsuds
  • 9
  • 1
0
votes
1 answer

Error in model.frame.default... variable lengths differ linear model validation in R

I am trying to use the function cv.glm() from the boot package for validation of a linear model. first I run the model and it works fine: > linear_model_red<-glm(red_wine_data$quality~.,data=red_wine_data) then, I want to do the…
Rita
  • 19
  • 1
  • 1
  • 4
0
votes
1 answer

Generating the dataframe objects that are produced during jackknife sampling

This post has been editted to more accurately describe the situation. I am utilising a form of jackknife sampling for my work. The jackknifed data will be used for calibration of a model, and the unused data will be used for validation. Rather than…
Quinn
  • 419
  • 1
  • 5
  • 21
0
votes
1 answer

clusterSEs: bootstrapped SE on glm with interaction terms error

I am running a logistic regression using glm() and want to calculate standard errors using cluster.bs.glm() from clusterSEs. The first bit of code throws an error: mod1 <- glm(lfp ~ age + I(age^2) + genstat + married + isced +…
yoland
  • 504
  • 4
  • 13
0
votes
0 answers

I need to write a general VBA program that will bootstrap any given size development triangle

I want to be able to bootstrap the total from any size development triangle in reserving. Sub Boot() Dim x As Range For Each x In Range("B:B") If x.Value = "" Then x.Select RowCount = ActiveCell.Row MsgBox (RowCount) Exit For End If Next x End…
0
votes
1 answer

Fill consecutive elements of a vector fast

This is a block bootstrap code in Matlab used for generating blocks of dates in a random order. First a random vector consists of the starting elements of a block and is followed bei 11 zeros at first. The random values represent the element of a…
InDubio
  • 67
  • 1
  • 9
0
votes
2 answers

R: Resampling 1 to nrow(y) with loops

I have n y variables with 100 rows each. To resample from 1 to nrows, the following code it gives the expected result, but its is tedious and impractical. To reproduce the situation, lets suposse that y has 5 rows: y<-rnorm(n=5, mean=10,…
0
votes
0 answers

Full Anova Summary Table in R

I am currently trying to conduct a two-way ANOVA in R using bootstrapping. In the bootstrap function I am writing, I am running into an issue trying to call the coefficients in which to bootstrap. The model I'm dealing with currently is looking at…
0
votes
1 answer

Extracting AUCs from Gradient Boosted Models from 200 manually created replicates in R

I have been working on getting a bootstrapped confidence interval around AUCs generated in a gradient boosted machine learning algorithm with a continuous outcome. Below is the code for one iteration of what needs to be repeated at least 200…
0
votes
1 answer

Subsampling and quantile normalization in R

I need to conduct an analyses where we need to do apply a GBM algorithm onto a series of bootstrapped replicates. Another wrinkle is that each replicate needs to have a quantile normalized outcome. What I am trying to eventually achieve is 1.…
0
votes
2 answers

How to create a bootstrap using arrays?

I'm trying to create a bootstrap using arrays. I have a dataset of two stocks with data in columns B and C: 16/08/2016 79.84 70.87 15/08/2016 80.26 71.79 12/08/2016 80.22 71.7 11/08/2016 80.56 71.98 10/08/2016 80.55 71.21 09/08/2016 …
0
votes
1 answer

R: obtain coefficients&CI from bootstrapping mixed-effect model results

The working data looks like: set.seed(1234) df <- data.frame(y = rnorm(1:30), fac1 = as.factor(sample(c("A","B","C","D","E"),30, replace = T)), fac2 = as.factor(sample(c("NY","NC","CA"),30,replace = T)), …
Chuan
  • 667
  • 8
  • 22
0
votes
1 answer

Creating confidence intervals for regression curve in GLMM using Bootstrapping

Have created a GLMM model and plotted the predicted probabilities of each factor. However, I cannot fathom how to create confidence intervals using the BootMer function. I keep getting the error message cannot simulate from non integer prior…
0
votes
2 answers

Bootstrapping multiple columns in data.table in a scalable fashion R

This is a follow up question to this one. In the original question the OP wanted to perform bootstrap on two columns x1 and x2 that are fixed: set.seed(1000) data <- as.data.table(list(x1 = runif(200), x2 = runif(200), group = runif(200)>0.5)) stat…
sriramn
  • 2,338
  • 4
  • 35
  • 45