Wed 7 Dec, 2016 04:07 am
I am having troubles with MatLab:
I need to use the bootstrap method to resample a column vector of size k, for n times, but with sample size that is not the same of the distribution (vector). In other words, out of a 532x1 vector I need to take out 10.000 samples of size 120 with replacement. I'm not very familiar with MatLab and not even with statistics, but I'm trying. Here's what I tried so far:
- bootstrp function, where I specified (among the other things) the number of repetitions, but I don't how to select a sample size smaller than the size of the distribution.
- randsample function, where I specified sample size but don't know how to repeat for 10.000 times with replacement (also datasample)
- h = distribution(ceil(n*rand(1,n)) was suggested on a manual, but I'm not sure how it is used or fits in.
Last but not least, I would like to know how to maximize a non linear function in MatLab.
Thanks for the help,