About regression with bootstrap
조회 수: 1 (최근 30일)
이전 댓글 표시
I have a function to calculate regression with bootstrap approach This is my function: function r=reboots(rd,Mw amax depth Vs Repi) n=length(rd); X=[ones(size(rd)) Mw' amax' depth' Vs' Repi']; w=[rd' Mw' amax' depth' Vs' Repi']; b=regress(rd',X) B=11; k=[1:n]; for i=1:B j=randsample(k,n,true); wb=w(j,:); yb=wb(:,1); Xb=[ones(n,1) wb(:,2:3)]; bb(:,i)=regress(yb,Xb); end bboot0=mean(bb(1,:)) bboot1=mean(bb(2,:)) bboot2=mean(bb(3,:)) bias0=bboot0-b(1) bias1=bboot1-b(2) bias2=bboot2-b(3)
I compute this function in command window with f(rd,Mw amax depth Vs Repi) f(rd,Mw amax depth Vs Repi) | Error: Unexpected MATLAB expression.
What should I do?
Thanks any one who can help me to solve my problem.
댓글 수: 0
답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Regression에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!