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!