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

Looping through function arguments (series of contrasts with multcomp::glht)

I wish to write a function that runs contrasts over a regression model and bootstraps those results to get confidence intervals, looping that function over a list of contrasts. I have tried for loops nested within functions, lapply, map ... none…
Hi_Viz
  • 49
  • 4
0
votes
1 answer

R bootstrapping for the two dataframe individual column wise

Want to do Bootstrapping while comparing two dataframe column wise with the different number of rows. I have two dataframe in which row represent values from experiments and column with the dataset names (data1, data2, data3, data4) emp.data1 <-…
Lucky sardar
  • 131
  • 1
  • 7
0
votes
1 answer

Bootstrap paired data

I need to bootstrap a a relative effect estimate calculated from paired binary data and I don't know how to do this. Below example data set: # Create test data n <- 1000 treated <- rbinom(n, 1, 0.7) control <- rbinom(n, 1, 0.5) data <-…
Pinus
  • 17
  • 4
0
votes
2 answers

How do I write a simple function that incorporates a function from an R package?

This runs fine when I specify everything, but just trying to generalize it a bit with "score" and "outcome" and it fails (see the end). Any idea how to do this? (I have the indices thing because I want to bootstrap this later) library(PRROC) df <-…
CineyEveryday
  • 127
  • 1
  • 8
0
votes
1 answer

Interpreting R Bootstrapping Output: Confidence Intervals

I am trying to understand bootstrapping in R using the Boot package. I am trying to do a simple spearman rank correlation. I have some code based on a tutorial I found online but am having some issues interpreting the output. The code is…
nsg794
  • 1
  • 1
0
votes
0 answers

Changing bootstrapped sample variables w/o regenerating bootstrap

I am using a bootstrapped dataset to fit a model. After fitting the model, I would like to change the bootstrapped dataset and use this new dataset to predict. My problem is that I can't change the bootstrapped dataset. It often tells me that the…
Stata_user
  • 562
  • 3
  • 14
0
votes
2 answers

Block Bootstrapping using Tidymodels

I have a monthly (Jan - Dec) data set for weather and crop yield. This data is collected for multiple years (2002 - 2019). My aim is to obtain bootstrapped slope coefficient of the affect of temperature in each month on yield gap. In bootstrapping,…
0
votes
1 answer

How to bootstrap weighted mean in a loop in r

I would like to run a bootstrap of a weighted mean in a for loop (I don’t think I can use ‘apply’ because it concerns a weighted mean). I would only need to store the resulting standard errors in a dataframe. Another post provided the code for how…
Anne
  • 19
  • 4
0
votes
1 answer

Hist with lines in R

I generate 4 parts of big data: cluster1(10000 points), cluster2(15000 points), cluster3(15000 points) and throws(500 points). Here is the…
0
votes
1 answer

i need help for applying bootstrap

I'm trying to understand what I'm supposed to do here. i already applied lasso and ridge regression, found the optimal lambda and refitted the models. but i don't understand what am i supposed to do after that. QUESTION : ". For the Diabetes data…
Maisaa
  • 1
0
votes
1 answer

what should i use instead of 'text-justify' in bootstrap?

guys as we know that bootstrap 5 removed the "text-justify" class now I don't know that what should I use instead of text-justify in bootstrap. And I don't know why they dropped #29679.( "text-justify" class)
Noor
  • 5
  • 3
0
votes
0 answers

lme4: bootstrap confidence intervals using sample data not in model

I want to calculate the confidence interval for a model parameter (residual SD) divided by the mean of a variable not included in the model. Example: library(lme4) #> Loading required package: Matrix set.seed(1) mod <- lmer(angle ~ recipe +…
JohannesNE
  • 1,343
  • 9
  • 14
0
votes
1 answer

R mean compare two dataset with the bootstrap method

I am having two sets of data values are arranged in different bins I want to compare two data sets mean accross bins of dataset1 and dataset2 visualize in line plot or any method to visualize I am new to this kind of analysis any suggestion will be…
BISEP
  • 11
  • 1
0
votes
1 answer

Selecting the sample size of each bootstrap sample

I have a dataframe with about 1700 observations (rows) in 29 variables (columns) and I have to select a mixture of 7 of these observations for which the weighted mean (of each variable) is as equal as possible as the weighted mean (of each variable)…
0
votes
1 answer

Python curve fitting using MLE and obtaining standard errors for parameter estimates

The original problem While translating MATLAB code to python, I have the function [parmhat,parmci] = gpfit(x,alpha). This function fits a Generalized Pareto Distribution and returns the parameter estimates, parmhat, and the 100(1-alpha)% confidence…