About regression with bootstrap

1 view (last 30 days)
Skydriver
Skydriver on 14 Dec 2017
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.

Answers (0)

Categories

Find more on Simulink in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!