Questions tagged [resampling]

Resampling is any of a variety of methods for estimating the precision of sample statistics by jackknifing or bootstrapping. In it also used to validating models by using random subsets (bootstrapping, cross validation).

From Wiki

In statistics, resampling is any of a variety of methods for doing one of the following:

Estimating the precision of sample statistics (medians, variances, percentiles) by using subsets of available data (jackknifing) or drawing randomly with replacement from a set of data points (bootstrapping)

Exchanging labels on data points when performing significance tests (permutation tests, also called exact tests, randomization tests, or re-randomization tests)

Validating models by using random subsets (bootstrapping, cross validation)

Common resampling techniques include bootstrapping, jackknifing and permutation tests.

983 questions
0
votes
1 answer

Bootstrapping in R - each sample comprising of multiple rows

With an example dataframe pay, I am bootstrapping using base R. The main difference from classical bootstrapping is that a sample can have multiple rows which must all be included. There are 7 ID's in pay, hence my goal is to create a sample of…
Dudelstein
  • 383
  • 3
  • 16
0
votes
1 answer

Using frequency data to populate dataframe in R

I am trying to model an existing meta-analysis to examine alternative hypotheses (e.g., doing a random-effects analysis), as well as re-sampling techniques. There are over 2,000 subjects, but the data is fairly simple: a binary outcome, success or…
Jerry
  • 9
  • 2
0
votes
1 answer

generate stratified bootstrap resamples in R

Assume I have a data frame with 3 variables and 7 rows df <- data.frame(V1=c(0,1,0,0,0,1,0), V2=rnorm(7), V3=rnorm(7)) How can I create a bootstrapped data frame with say 20 rows, where the distribution of the zeros and ones in V1 is about the…
spore234
  • 3,550
  • 6
  • 50
  • 76
0
votes
1 answer

R caret LDA error when using resampling

I am running into a problem using LDA through caret with caregorical predictors. For some reason, enabling resampling throws an error that isn't very informative. Has anyone seen this before? Here is a reproducible toy…
user1642513
0
votes
1 answer

Why is boot returning all NA values

Can anyone tell me why boot() is returning all NA values in the code below please? library(boot) diff.means.boot <- function(data, k) { m1 <- mean(subset(data, vs == 1)[k, "mpg"]) m2 <- mean(subset(data, vs == 0)[k, "mpg"]) …
luciano
  • 13,158
  • 36
  • 90
  • 130
0
votes
1 answer

how to find the correct sampling rate for interp1 in Matlab

i am trying to find the correct sampling rate for interp1 (or decimate or resample) for plotting a number of points in axes obtained by imfreehand.. First i plot something (anything not sine…
gep
  • 93
  • 1
  • 7
0
votes
0 answers

Does Spotify resample their songs?

I was wondering how Spotify handles multiple audio formats (different combinations of 16/24-bits and frequency (Hz) on Windows? Do they resample the songs? Thanks:)
Almir
  • 167
  • 1
  • 2
  • 6
0
votes
1 answer

MFT NAudio Resampling on the fly

I want to resample an audio file using NAudio and MFT on-the-fly. For example, I have the following audio file: File name: MyAudioFile.mp3 Duration: 10 sec When this file is being played, I only want to resample that particular position to WAV in…
user3261909
  • 145
  • 1
  • 2
  • 11
0
votes
1 answer

Resample the Image Pixels in Python

I have an image of 300*300 pixels size and want to convert it into 1500*1500 pixels size using python. I need this because i have to georeferenced this image with 1500*1500 pixel raster image. Any python library function or basic fundamental how to…
Piyush
  • 388
  • 1
  • 6
  • 21
0
votes
0 answers

IMFSourceReader - Decode and Re-sample audio in C#

I am looking to decode and re-sample an audio file using IMFSourceReader in C#. For example: I want to decode (MP3 to WAV) AND re-sample the bit rate (64Kbps to 192Kbps) of the following audio file - MyAudioFile - 48KHz - 64Kbps.MP3 to -…
user3261909
  • 145
  • 1
  • 2
  • 11
0
votes
0 answers

How can i change the size of an array describing a function (leaving the function the same)?

my problem is the following. I have a series of arrays, representing an image. Every array describes an x-row of a f(x,y,z). Every element of the array contains an integer (which rapresents the value of the voxel). So, every element of a given array…
0
votes
0 answers

How to use bootstrapping and weighted data?

I have two variables that I'd like to analyze with a 2x2 table, which is easy enough. datatable=table(data$Q1data1, data$Q1data2) summary(datatable) However, I need to weight each variable separately using two frequency weighting variables that I…
mp4-12c
  • 3
  • 4
0
votes
1 answer

View selected sample for each replication in bootstrap loop

Assume following simple bootstrap procedure: x <- c(20,54,18,65,87,49,45,94,22,15,16,15,84,55,44,13,16,65,48,98,74,56,97,11,25,43,32,74,45,19,56,874,3,56,89,12,28,71,93) n <- length(x) nBoot <- 5; mn <- numeric(nBoot) for(boots in…
user3387899
  • 601
  • 5
  • 18
0
votes
1 answer

Python Panda TIme series re sampling

I am writing scripts in panda but i could not able to extract correct output that i want. here it is problem: i can read this data from CSV file. Here you can find table structure http://postimg.org/image/ie0od7ejr/ I want this output from above…
user3930865
  • 33
  • 1
  • 12
0
votes
1 answer

R - Some values not added to vector?

I just ran the following code and am confused by the result: > N = 6000 > my.vect = numeric(N) > sum(my.vect[1:6000]) > for ( i in 1:100) + { + screen = sample(6000, 50, replace=FALSE) + my.vect[screen] =+ 1 + } > sum(my.vect[1:6000]) [1]…
Slavatron
  • 2,278
  • 5
  • 29
  • 40