Help with Bootstrap functuon, bootfun variable

I have a curve data which:
x= (1:2^16) and y is a 1x2^16 matrix.
I want to create 9 more "y" data, by using bootstrap technique, that based on the initial y.
bootstat = bootstrp(nboot,bootfun,d); I wanted to use that function but I don't know what to write for "bootfun".

 채택된 답변

Jonas
Jonas 2021년 5월 1일
편집: Jonas 2021년 5월 1일

0 개 추천

bootfun has to be empty using [ ]. then you just need the second output from bootfun [~,idx]=bootstrp(...) and idx contains n columns of index for n bootstrap sets, each column has the same number of entries as your original data. calling originalData(idx) will give you a bootstrap set in each column

댓글 수: 4

Mehmet Can MERIC
Mehmet Can MERIC 2021년 5월 1일
편집: Mehmet Can MERIC 2021년 5월 1일
I didn't understand the first part of what you wrote.
Basically, for an example:
I have a curve that has a data of:
x = [1,2,3,4,5,6,7,8,9,10];
y = [1001,1002,1003,1004,1005,1006,1007,1008,1009,1010];
let's say these are all I have.
So now, I want to create 9 more curves by using the main curve above via bootstrap. What should I write?
Jonas
Jonas 2021년 5월 1일
편집: Jonas 2021년 5월 1일
[~,idx]=bootstrp(9,[ ],y);
then call xBootstrapped=x(idx) and yBootstrapped=y(idx) which gives you each a 10x9 matrix. each column is a bootstrap set.
Thanks a lot!
Jonas
Jonas 2021년 5월 1일
good luck ;)

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

제품

릴리스

R2020b

질문:

2021년 4월 30일

편집:

2021년 5월 1일

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by