I have a simple nx1 array of integers and I'd like to bootstrapping it for evaluate the confidence intervals of the proportions.
I've found a solution for IBM SPSS, but i'd like to do this analysis with matlab, you can find here the example: http://publib.boulder.ibm.com/infocenter/spssstat/v20r0m0/index.jsp?topic=%2Fcom.ibm.spss.statistics.cs%2Fbootstrap_telco_frequencies_table.htm
in Matlab I have this data, and it's from tabulation of array called 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%
And I've tried to use as BOOTFUN for the bootstrap confidence interval, the following expression:
n = histc(c,unique(c))/sum(n);
I mean for n the proportions of the previous array.
Finally I use the bootci function for evaluate the intervals:
ci= bootci(1000,n,c);
I know I'm wrong in the setup of bootfun but I don't know how to fix it, and for this reason I'd like to have your help. I hope the problem is clear enough.