| Products & Services | Solutions | Academia | Support | User Community | Company |
| Download Product Updates | | | Get Pricing | | | Trial Software |
| Documentation → Statistics Toolbox |
| Contents | Index |
| Learn more about Statistics Toolbox |
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)
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:
'normal' — Normal approximated interval with bootstrapped bias and standard error.
'per' — Basic percentile method.
'cper' — Bias corrected percentile method.
'bca' — Bias corrected and accelerated percentile method. This is the default.
'student' — Studentized confidence interval.
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:
'UseParallel' — If 'always' and if a matlabpool of the Parallel Computing Toolbox is open, compute bootstrap iterations in parallel. If the Parallel Computing Toolbox is not installed, or a matlabpool is not open, computation occurs in serial mode. Default is 'never', or serial computation.
'UseSubstreams' — If 'always', perform each bootstrap iteration using a separate Substream of the random number generator (aka Stream). This option is available only with RandStream types that support Substreams. Default is 'never', or do not use a different Substream for each bootstrap iteration.
'Streams' — An object of the RandStream class,or a cell array of RandStream objects. Defaults is an empty cell array. If you do not supply a value for this parameter, bootci uses the default RandStream on each MATLAB executable to generate boostrap samples. Otherwise, bootci selects bootstrap samples using the supplied RandStream object(s).
If you select 'UseSubstreams', the Streams parameter, if present, must be a scalar RandStream object.
If you do not select 'UseSubstreams', then the Streams parameter, if present, must match the number of processors used for the computation. For serial computation, the Streams parameter must be a scalar.
If computation is distributed ('UseParallel' is 'always' and a matlabpool is open), then the Streams parameter must be a cell array of the same length as the matlabpool size. In this case, each element of the cell array supplies the random number generator for bootstrap sampling on one of the parallel workers.
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![]() | biplot | bootstrp | ![]() |

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 |