Bootstrap
A class to do statistical bootstrapping. The calculations occur via the method generateSamples(). Until generateSamples() is called the results are meaningless.
It is possible to save the individual bootstrap samples from which the bootstrap samples can be retrieved. Recognize that this could be a lot of data. The class implements four classic bootstrap confidence intervals normal, basic, percentile, and BCa. To estimate the quantiles it uses algorithm 8 from Hyndman, R. J. and Fan, Y. (1996) Sample quantiles in statistical packages, American Statistician 50, 361–365 as the default. This can be changed by the user.
Parameters
the data to sample from to form the bootstraps
a function to be applied to the data
the random number stream for forming the bootstraps
a name for the bootstrap statistics
Constructors
Properties
This is the statistics of the bootstrap replicates.
If true, the stream will automatically participate in having its stream advanced to the next sub-stream via stream managers
Tells the stream to start producing antithetic variates
This is acrossBootstrapAverage - originalDataEstimate
Each element is the bootstrap estimate for sample i minus originalDataEstimate
These are the bootstrap replicates.
If the bootstrap samples were saved, this returns the generated averages for each of the samples
If the bootstrap samples were saved, this returns the generated variance for each of the samples
This is the standard deviation of the across bootstrap observations of the estimator for each bootstrap generated
If the save bootstrap data option was not turned on during the sampling then the list returned is empty.
the default confidence interval level
The number of bootstrap samples that were used to produce the bootstrap estimate
the average for the original data
The size of the original population of data from which to sample
If true, the stream will automatically participate in having its stream reset to its start stream via stream managers
the underlying stream of random numbers
Each element is the bootstrap estimate for sample i minus getOriginalDataEstimate() divided by getBootstrapStdErrEstimate()
The list itself is unmodifiable. The underlying statistic objects can be modified, but have no effect on the bootstrap generate statistics. The statistical values will be changed the next time generateSamples() is executed. Users are advised to copy the statistics in the list (via Statistic newInstance()) before executing generateSamples if persistence is required.
Functions
For the so called, BCa, interval, the approach requires an acceleration factor. The acceleration factor measures the rate of change of the standard error of the estimator with respect to the target parameter on a normalized scale. This function computes the acceleration factor based on the bootstrap estimates and the original estimated quantity using jackknifing.
Positions the RNG at the beginning of its next sub-stream
The "basic" method, but with no bias correction. This is the so-called centered percentile method (2θ − Bu , 2θ − Bl ) where θ is the bootstrap estimator and Bu is the 1 - alpha/2 percentile and Bl is the lower (alpha/2) percentile, where level = 1-alpha of the bootstrap replicates.
The BCa bootstrap confidence interval which accounts for bias correction and adjusted for acceleration.
For the so called, BCa, interval, the approach requires a bias correction factor which in essence measures the median bias of the bootstrap replicates for the estimated quantity. This function computes the bias correction factor based on the bootstrap estimates and the original estimated quantity.
This is the bootstrap-t or sometimes called percentile-t confidence interval. It is formed by capturing a t-type statistic which standardizes the individual bootstrap estimates. This confidence interval is only available if the parameter (numBootstrapTSamples) in the generateSamples() function is greater than 1; otherwise, the returned interval is (-infinity, +infinity).
Creates a random variable to represent the data in each bootstrap sample for which the data was saved.
This method changes the underlying state of the Bootstrap instance by performing the bootstrap sampling.
The "percentile" method, but with no bias correction. This is the percentile method (Bl , Bu ) where Bu is the 1 - alpha/2 percentile and Bl is the lower (alpha/2) percentile, where level = 1-alpha of the bootstrap replicates
The resetStartStream method will position the RNG at the beginning of its stream. This is the same location in the stream as assigned when the RNG was created and initialized.
Resets the position of the RNG at the start of the current sub-stream
Gets the standard normal based bootstrap confidence interval. Not recommended.
Assigns the stream associated with the supplied number from the default RNStreamProvider