Bootstrap a statistic in a grouped sample

版本 1.0.0.0 (37.8 KB) 作者: Dimitri Shvorob
(Extension of BOOTSTRP)
2.3K 次下载
更新时间 2016/4/4

查看许可证

Function BSTRAG builds on an earlier FEX submission, BSTRAP - itself an extension of BOOTSTRP (Statistics Toolbox, v. 5-6) - by implementing 'groupwise' operation, wherein rows of x (,y,z,..) are split into several groups (having n1, n2, n3, .. rows), marked by distinct values of grouping variable c, and each resampling iteration randomly selects n1 rows from group 1, n2 rows from group 2, etc.
Syntax of BSTRAG is similar to that of BSTRAP, but differs in requiring an extra input argument, group-assignment vector, which must also be supplied to the function computing (matrix- or structure-valued) bootstrapped statistics.

Function BSTATS inputs an array or a structure array produced by BSTRAP, and outputs means, variances and (2.5%, 97.5%) percentiles of the bootstrap distributions. (Percentiles are calculated using PRCTILE of Statistics Toolbox - replacing it with a user-contributed analog should be straightforward).

See BSTRAG_DEMO and BSTRAP_DEMO for examples.

引用格式

Dimitri Shvorob (2024). Bootstrap a statistic in a grouped sample (https://www.mathworks.com/matlabcentral/fileexchange/14411-bootstrap-a-statistic-in-a-grouped-sample), MATLAB Central File Exchange. 检索时间: .

MATLAB 版本兼容性
创建方式 R14SP1
兼容任何版本
平台兼容性
Windows macOS Linux

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
版本 已发布 发行说明
1.0.0.0

BSD