Statistics - Maple Programming Help

Online Help

All Products    Maple    MapleSim


Home : Support : Online Help : Statistics and Data Analysis : Statistics Package : Simulation : Statistics/Bootstrap

Statistics

  

Bootstrap

  

compute bootstrap statistics

 

Calling Sequence

Parameters

Description

Options

Examples

Calling Sequence

Bootstrap(stat, inp, options)

Parameters

stat

-

stat, procedure; statistic to bootstrap

inp

-

input data set or algebraic expression

options

-

(optional) equation(s) of the form option=value where option is one of samplesize, replications, output, weights, ignore or statopts; specify options for the Bootstrap function

Description

• 

The Bootstrap function approximates the value of a standard statistic over a data sample or random variable by resampling from the sample or random variable and averaging the results.

• 

The first parameter stat is the name of a standard quantity applied to either a data set or random variable (e.g. Mean, Median, Variance).

• 

The second parameter inp can be a data sample or a random variable to be used as input.  If a data sample is specified, the algorithm attempts to draw, with replacement, from the data sample to create a new data sample with a similar weight.

Options

  

The options argument can contain one or more of the options shown below.

• 

samplesize = 'deduce' or posint -- If this option is set to 'deduce' (default) and a data sample has been provided as the first argument to this function, then the sample size will be the size of the data sample.  If set to 'deduce' and a random variable is specified, the procedure will default to 1000 samples.

• 

replications = posint -- By default this parameter is set to 1000.  This parameter specifies the number of data sets that should be generated (or replicated) - each of size specified by samplesize.

• 

output = 'value', 'standarderror', 'array' or list('value', 'standarderror') -- This parameter specifies the desired output from the bootstrap function.  If 'value' is specified (default), the function simply returns the value approximated by Bootstrap.  If 'array' is specified then an Array of size replications will be returned containing the statistic calculated on each generated data sample.  If 'standarderror' is specified then the function returns the standard error from the calculation.  Otherwise, a list of these parameters may be specified which returns a list populated accordingly.

• 

ignore = truefalse -- This option is used to specify how to handle non-numeric data. If ignore is set to true all non-numeric items in data will be ignored.  This option is only valid if inp is a data set.

• 

weights = rtable -- Vector of weights (one-dimensional rtable). If weights are given, the Bootstrap function will weight the sample inp accordingly. Note that the weights provided must have type,realcons and the results are floating-point, even if the problem is specified with exact values. The data array and the weights array must have the same number of elements.  This option is only valid if inp is a data set.

• 

statopts = list -- This parameter specifies an ordered list of parameters for the statistical quantity called.  By default this is simply an empty list.

Examples

withStatistics:

Bootstrap the mean on a data sample.

NRandomVariableNormal5,1:

SSampleN,1000:

MeanN

5

(1)

MeanS

5.06112708556688

(2)

Bootstrap'Mean',S,replications=1000

5.06138182445006

(3)

Bootstrap the mean on a random variable.

Bootstrap'Mean',N,replications=1000

4.99928426793059

(4)

See Also

Statistics

Statistics[Computation]

 


Download Help Document

Was this information helpful?



Please add your Comment (Optional)
E-mail Address (Optional)
What is ? This question helps us to combat spam