【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
    评论
Matlab中的bootstrap是一种统计分析方法,用于估计参数的不确定性和推断修正。它通过重复采样和参数估计来构建一组参数的分布,从而估计原始样本中参数的真实分布。 bootstrap的基本思想是利用原始样本来模拟整个总体的分布,从而推断参数的估计误差。它允许我们进行推断,即使我们无法从总体中直接计算样本参数的抽样分布。通过重复抽取原始样本数据集的小样本,然后计算出每个小样本的参数估计值,我们可以得到一组估计值分布。 Matlab中的bootstrap方法可以通过如下步骤完成: 1. 准备原始样本数据集。 2. 设定重复采样的次数,例如1000次。 3. 对于每一次重复采样,从原始样本中随机选择与原始样本相同大小的样本,并进行参数估计。 4. 重复步骤3,直到所有的重复采样完成。 5. 利用所有的参数估计值,可以得到参数的分布情况,可以通过计算平均值、中位数、置信区间等来描述参数的不确定性。 通过bootstrap方法,我们可以得到参数的点估计值和区间估计值,并且还可以推断在给定原始样本的情况下,参数的真实分布。这是一种非参数统计方法,不需要对总体分布做出明确的假设,因此适用于各种类型的数据和分布。 总而言之,Matlab中的bootstrap方法允许我们从原始样本中估计参数的不确定性和推断修正,从而提供更可靠的统计推断结果。它在统计学中广泛应用,在数据分析和模型建立过程中非常有价值。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值