【Matlab】Bootstrap

Bootstrap是一个很通用的工具,用来估计标准误差、置信区间和偏差。由Bradley Efron于1979年提出,用于计算任意估计的标准误差.意义:不靠外界力量,而靠自身提升自己的性能,翻译为自助/自举.


Bootstrap:利用计算机手段进行重采样。种基于数据的模拟(simulation)方法,用于统计推断。基本思想是:利用样本数据计算统计量和估计样本分布,而不对模型做任何假设(非参数bootstrap)

? Bootstrap有两种形式:非参数bootstrap和参数化的bootstrap,但基本思想都是模拟。



(1) matlab 中实施Bootstrap
 Using the bootstrp function you can resample the lsat and gpa vectors as many times as you like and consider the variation in the resulting correlation coefficients.Here is an example.
rhohat = corr(lsat,gpa)
rhos1000 = bootstrp(1000,'corr',lsat,gpa);

(2)
It is often desirable to construct a confidence interval for a parameter estimate in statistical inferences. Using the bootci function, you can use bootstrapping to obtain a confidence interval. The confidence interval for the lsat and gpa data is computed as: 
ci = bootci(5000,@corr,lsat,gpa)
ci =
    0.3313
    0.9427

(3)
[bootstat,bootsam] = bootstrp(...)   
returns an n-by-nboot matrix of bootstrap indices, bootsam. Each column in bootsam contains indices of the values that were drawn from the original data sets to constitute the corresponding bootstrap sample. For example, if d1,... each contain 16 values, and nboot = 4, then bootsam is a 16-by-4 matrix. The first column contains the indices of the 16 values drawn from d1,..., for the first of the four bootstrap samples, the second column contains the indices for the second of the four bootstrap samples, and so on. (The bootstrap indices are the same for all input data sets.) To get the output samples bootsam without applying a function, set bootfun to empty ([]).
  • 0
    点赞
  • 7
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值