rcatool.stats.bootstrap.block_bootstr
- rcatool.stats.bootstrap.block_bootstr(data, block=5, nrep=500, nproc=1)[source]
Calculate block bootstrap samples.
This is a block boostrap function, converted from R into python, based on: http://stat.wharton.upenn.edu/~buja/STAT-541/time-series-bootstrap.R
- Parameters:
data (list/array) – 1D data array on which to perform the block bootstrap.
block (int) – the block length to be used. Default is 5.
nrep (int) – the number of resamples produced in the bootstrap. Default is 500.
nproc (int) – Number of processors, default 1. If larger than 1, multiple processors are used in parallell using the multiprocessing module.
- Returns:
arrBt – 2D array with bootstrap samples; rows are the samples, columns the values.
- Return type:
Array