Products & Services Solutions Academia Support User Community Company

Learn more about Statistics Toolbox   

bootci - Bootstrap confidence interval

Syntax

ci = bootci(nboot,bootfun,...)
ci = bootci(nboot,{bootfun,...},'alpha',alpha)
ci = bootci(nboot,{bootfun,...},...,'type',type)
ci = bootci(nboot,{bootfun,...},...,'type','student','nbootstd',nbootstd)
ci = bootci(nboot,{bootfun,...},...,'type','student','stderr',stderr)
ci = bootci(nboot,{bootfun,...},...,'Options',options)

Description

ci = bootci(nboot,bootfun,...) computes the 95% bootstrap confidence interval of the statistic computed by the function bootfun. nboot is a positive integer indicating the number of bootstrap samples used in the computation. bootfun is a function handle to a function returning a scalar. Additional input arguments to bootci are passed as data inputs to bootfun. Data inputs are scalars, column vectors, or matrices; vectors and matrices must have the same number of rows. Scalar data inputs are passed to bootfun unchanged. Rows of non-scalar data inputs are used to create bootstrap samples. ci is a vector containing the lower and upper bounds of the confidence interval.

ci = bootci(nboot,{bootfun,...},'alpha',alpha) computes the 100*(1-alpha)% bootstrap confidence interval of the statistic defined by the function bootfun. bootfun and the data that bootci passes to it are contained in a single cell array. alpha is a scalar between 0 and 1. The default value of alpha is 0.05.

ci = bootci(nboot,{bootfun,...},...,'type',type) computes the bootstrap confidence interval of the statistic defined by the function bootfun. type is the confidence interval type, chosen from among the following strings:

ci = bootci(nboot,{bootfun,...},...,'type','student','nbootstd',nbootstd) computes the studentized bootstrap confidence interval of the statistic defined by the function bootfun. The standard error of the bootstrap statistics is estimated using bootstrap, with nbootstd bootstrap data samples. nbootstd is a positive integer value. The default value of nbootstd is 100.

ci = bootci(nboot,{bootfun,...},...,'type','student','stderr',stderr) computes the studentized bootstrap confidence interval of statistics defined by the function bootfun. The standard error of the bootstrap statistics is evaluated by the function stderr. stderr is a function handle. stderr takes the same arguments as bootfun and returns the standard error of the statistic computed by bootfun.

ci = bootci(nboot,{bootfun,...},...,'Options',options) specifies options that govern the computation of bootstrap iterations. One option requests that bootci perform bootstrap iterations using multiple processors, if the Parallel Computing Toolbox is available. Two options specify the random number streams to be used in bootstrap resampling. This argument is a struct that you can create with a call to statset. You can retrieve values of the individual fields with a call to statget. Applicable statset parameters are:

Examples

Compute the confidence interval for the capability index in statistical process control:

y = normrnd(1,1,30,1);                 % Simulated process data
LSL = -3; USL = 3;                     % Process specifications
capable = @(x)(USL-LSL)./(6* std(x));  % Process capability
ci = bootci(2000,capable,y)            % BCa confidence interval
ci =
    0.8122
    1.2657

sci = bootci(2000,{capable,y},'type','student') % Studentized ci
sci =
    0.7739
    1.2707

See Also

bootstrp, jackknife

  


Recommended Products

Includes the most popular MATLAB recorded presentations with Q&A sessions led by MATLAB experts.

 © 1984-2009- The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS