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

No missing values in data, still getting this error with boot()--> Error in if (const(t, min(1e-08, mean(t, na.rm = TRUE)/1e+06)))

EDIT: Just wanted to let you all know I figured out the issue-- the indirects function I was using indicated that the boot function should use the 6th regression coefficient in the linear regression model to do its things but it turns out I only had…
Gina Roussos
  • 53
  • 1
  • 1
  • 5
0
votes
0 answers

Program formula to be jackknifed using R

I have a quite complex question of how to write an R code, as I went through all the possible options known to me without any results. I can do the first part in excel within less than one hour, i.e., to get a result for the following formula. C =…
Natalie
  • 11
  • 2
0
votes
0 answers

Confidence Interval of Coefficient of Bootstrap

Trying to obtain the confidence interval of correlation from bootstrap that of two variables. Current code is from documentation. pearson <- function(d, i){ d2 <- d[i,] return(cor(d2$LSAT,d2$GPA)) } bootcorr <-…
xyn
  • 25
  • 6
0
votes
1 answer

R - Error: argument 1 is not a vector when bootstrapping

I'm attempting to bootstrap my data to get 2000 measurements based on the linear regression and Theil regression (mblm function w/ repeated=FALSE). My bootstrap R code works perfectly for the normal regression (from what I can tell), given below: >…
Shawn
  • 353
  • 1
  • 14
0
votes
1 answer

Standard error and bias zero with bootstrapping

I want to take my dataset bodyfat_trimmed and use bootstrapping to retrieve the mean and the standard errors. However, I seem to be using the same data all the time and therefore get zero standard error and bias. How can I solve this? bsfunc <-…
0
votes
1 answer

Bootstrap of weighted means in R

I have a data frame with 27 samples divided in 3 strata. I want to replicate 500 times a weighted mean, where the mean is calculate among the random selection of 3 samples for stratum and the weight is the relative area of the strata. My idea was…
Matt_4
  • 147
  • 1
  • 12
0
votes
0 answers

Repeatedly subsample rows and preform function on subset

I have a dataset like so: set.seed(569) dat<- data.frame(region=c(rep(1, 20), rep(2, 10)), loc= paste("plot", "_",seq(1,30,1)), sp1= sample(0:3, 30, replace=T),sp2= sample(0:3, 30, replace=T),sp3= sample(0:3, 30, replace=T),sp4=…
Danielle
  • 785
  • 7
  • 15
0
votes
0 answers

creating a loop with a neural net and logistic regression to compare MSE in R

I would like to create a loop with a neural net and logistic regression to compare the bootstrapped MSE between the two. My issue is that my formulation of the MSE statistic makes the boot function not work. I went ahead and created some simulated…
JWH2006
  • 239
  • 1
  • 11
0
votes
0 answers

BCa and p-value, how to find intercept

I am trying to extrapolate the p-value of my numerous bootstrap BCA. I know that confidence intervals are more robust but in my case I have hundreds of bootstrapped glm and thus I need to correct for multiple comparisons. As BCa bootstraps are…
user3188922
  • 329
  • 1
  • 3
  • 19
0
votes
1 answer

Error when bootstrapping large n with boot package (error: integer overflow)

Why can I not bootstrap a statistic with large n using the boot package? Although, 150,000 obs is not large, so I don't know why this isn't working. Example library(boot) bs <- boot(rnorm(150000), sum, R = 1000) bs ORDINARY NONPARAMETRIC…
Vedda
  • 7,066
  • 6
  • 42
  • 77
0
votes
1 answer

How to combine the outputs in a single data frame in r?

I have three outputs from three different bootstrap groups in R. The results of Bootstrap Statistics are generated as original, bias and std. error values for each group. Is it possible to define a function to put all the results together in a…
Reza
  • 147
  • 7
0
votes
1 answer

R: cv.glm variable lengh differ error

I'm trying to compare backward selection vs linear regression for dimensional reduction. The dataset is rather big with 150 variables. I have always used the same method to generate comparison with Cross Validation for selected models, but this time…
lydias
  • 841
  • 1
  • 14
  • 32
0
votes
1 answer

Increasing Bootstrap size in R

I have a time series on returns which is approximately 20 year long. Based on this time series, I want to compute somekind of a moving bootstrap to calculate the mean returns for every observation. Let me demonstrate this on an example: Let´s say we…
0
votes
3 answers

R: select rows by group after resampling

I want to do bootstrapping manually for a panel dataset. I need to cluster at individual level to make sure the consistency of later manipulation, that is to say that all the observations for the same individual need to be selected in bootstrap…
DXC
  • 75
  • 1
  • 7
0
votes
1 answer

R- do I made a mistake using boot() within the boot library

I am trying to run a correlation test between different columns within a table. I also use the bootstrap method to run the same test. I want to compare the result but found out that those are exactly the same result. So I am wondering is there…
VeraShao
  • 63
  • 8