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

Bootstrapping in SPSS

I was wondering if there was a work around for bootstrapping in SPSS? My license for SPSS doesn't have the boostrap module installed. I have also tried on R as well. I am not sure about the syntax for R bootstrapping as sources online give varying…
user6207696
0
votes
0 answers

Replication in R is not resampling

I am basically trying to create a 2 stage bootstrap where clusters are sampled first and then households within the clusters are sampled and calculations are one on the newly sampled dataset. I want to repeat this process 1000 times. My code does…
0
votes
1 answer

R: Bootstrap BCa confidence intervals for fixed design regression

I have a fixed design regression problem that I am trying to get bootstrap BCa confidence intervals for, using R. Here is an example (using lmRob) but this is only for illustration: require(robust) data(stack.dat) stack.rob <- lmRob(Loss ~ ., data =…
user3236841
  • 1,088
  • 1
  • 15
  • 39
0
votes
2 answers

R coding: bootstrap a dataset with repeated measures

My dataset looks like (call it data_xy) id X Y 1 5 10 1 6 11 1 4 8 2 3 9 2 3 12 3 4 10 ... observations from a total of N ids. Each id has several rows of measurements. I want to bootstrap the id with replacement. It is very likely that the…
user3075021
  • 95
  • 1
  • 8
0
votes
1 answer

How do I calculate the probability of a presidential candidate winning?

I have an object like const data = { 'Washington' : { ElectoralVotes : 12, RChance: 0 }, 'Oregon': { ElectoralVotes: 7, RChance: 15 }, . . . 'Hawaii' : { ElectoralVotes: 4, RChance : 35 } } where a key-value pair…
0
votes
1 answer

Where is my logic going wrong in trying to calculate the presidential outcome?

Let me explain what I'm trying to do. I have data like const dataByState = { 'Washington' : { ElectoralVotes : 12, RChance: 54, DChance: 46 }, 'Oregon': { ElectoralVotes: 7, RChance: 51, DChance: 49 }, . . . 'Hawaii' : {…
0
votes
1 answer

Weighted Median bootstrap

Currently I am obtaining 95% CI on the median by using this x<-rnorm(100) bootmed = apply(matrix(sample(x, rep=TRUE, 10^4*length(x)), nrow=10^4), 1, median) quantile(bootmed, c(.025, 0.975))[1]->a1 quantile(bootmed, c(.025,…
kutyw
  • 95
  • 4
0
votes
1 answer

I need help performing a bootstrap with two models

I want to perform a bootstrap to get a better estimation of the beta estimates, simulated with the simex method. The basic code is below. Value1 and Value2 should be repeated. library(simex) library(data.table) value1 <- rnorm(24, mean = 1, sd =…
rbru
  • 11
  • 4
0
votes
1 answer

image between 2 inline-table divs - doesn't work with bootstrap

I'm working on some trading ingame items site, that's not important here. My actual code is:
RaiZeN wants to trade: (5 minutes ago)
inteNsE-
  • 115
  • 1
  • 4
  • 13
0
votes
2 answers

Resampling in logistic regression

I have a simple dataset with one Y and 10 predictors (X1-X10) coded either 0,1 or 2 for 100 observations. n <- 100 Y <-…
Shima
  • 147
  • 2
  • 9
0
votes
0 answers

Grid Bootstrap - Error in solve.default(t(x) %*% x) : system computationally singular

I'm new of R, thus I apologize in advance if my following question may result a little dumb, but I really need some expert advice. I have a problem in applying someone else's code to my data. The author's code works perfectly with the examples he…
Hey Lyla
  • 45
  • 7
0
votes
0 answers

R Bootstrap Error - 'Original' Not Found

I am trying to bootstrap the standard errors of the parameter estimates in a glm, and I'm having a little trouble with the bootstrap step. I have defined my function as follows... boot.fn=function(data,index){ …
user42719
  • 41
  • 1
  • 3
0
votes
2 answers

Bootstrap LASSO Lambda

I am trying to bootstrap lambda1 parameter in LASSO regression (using library penalized) (NOT the coefficients estimates as i KNOW that is does not make sense to calculate e.g. 95% CIs for them, this is the question about lambda1 ONLY). This is…
AussieAndy
  • 101
  • 2
  • 11
0
votes
0 answers

`xor` function in R

I'm trying to work through the code in a bootstrap simulation on this post with two major hurdles. First, the few times I have played with bootstrapping, I have done it without using the {boot} package, and relying on functions like replicate, or…
Antoni Parellada
  • 4,253
  • 6
  • 49
  • 114
0
votes
1 answer

How to generated random number from lognormal distribution with known parameters mu and sigma?

I have a known parameters mu and sigma for lognormal distribution, and I don not know the lower and upper bound or interval for the random variable. I know (Random.nextGaussian() * sigma ) + mu used to generat random variat for normal distribution…
John
  • 107
  • 1
  • 14