【发布时间】:2013-07-30 10:33:21
【问题描述】:
我有一个简单的 nx1 整数数组,我想引导它来评估比例的置信区间。
我找到了 IBM SPSS 的解决方案,但我想使用 matlab 进行此分析,您可以在此处找到示例: http://publib.boulder.ibm.com/infocenter/spssstat/v20r0m0/index.jsp?topic=%2Fcom.ibm.spss.statistics.cs%2Fbootstrap_telco_frequencies_table.htm
在 Matlab 中我有这些数据,它来自名为 c 的数组列表:
Value | Count | Percent
1 300 2.99%
2 2928 29.16%
3 0 0.00%
4 3244 32.31%
5 0 0.00%
6 2589 25.78%
7 980 9.76%
我尝试将引导置信区间用作 BOOTFUN,如下表达式:
n = histc(c,unique(c))/sum(n);
我的意思是 n 前一个数组的比例。
最后我使用 bootci 函数来评估间隔:
ci= bootci(1000,n,c);
我知道我的 bootfun 设置有误,但我不知道如何修复它,因此我希望得到您的帮助。我希望问题足够清楚。
【问题讨论】:
标签: matlab statistics-bootstrap