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 number, defaults to 0, which means the next stream
the provider of random number streams, defaults to KSLRandom.DefaultRNStreamProvider
an optional name
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
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
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 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 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 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 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