Results of bootci and bootstrp funciton don't match.
1 view (last 30 days)
Show older comments
I tried bootci function, but got different result than if I use bootstrp function. For example, if I compute 5% confidence interval of varriance:
data=[1 2 4 9 16 25 36 49 64 81 100 121 144 169 196 225 256 289 324 361 400];
ci=bootsci(100000, @var, data);
gives values 10337 and 25885.
data=[1 2 4 9 16 25 36 49 64 81 100 121 144 169 196 225 256 289 324 361 400];
bootstat=bootstrp(100000, @var, data);
a=quantile(bootstat,0.025);
b=quantile(bootstat,0.975);
gives values 8107 and 23241, but I think that the results should be the same. Where make I mistake? Thank you.
Best regards Lukas
0 Comments
Accepted Answer
Ilya
on 24 Oct 2012
You will get a better match to your quantile results if you run
ci=bootci(1000, {@var, data}, 'type', 'per')
Take a look at the description of the 'type' parameter in the bootci doc or help.
More Answers (0)
See Also
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!