Commit ebcb99aa authored by Meryem Ayse Yucel's avatar Meryem Ayse Yucel
Browse files

Update ar_fit.m

Fixing bug in filename stepwise->stepwisefit, and the relevant extracted output.
parent d0fac4b2
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -26,7 +26,10 @@ if(nosearch)
    coef = invR * Q'*yy(lstValid);
    res = yy(lstValid) - X(lstValid,:)*coef;
else
    [coef, res] = stepwise(X(lstValid,:), yy(lstValid));
    [B,SE,PVAL,in,stats,nextstep,history] = stepwisefit(X(lstValid,:), yy(lstValid),'Display','off');
    coef = B;
    res = stats.yr; 
%     [coef, res] = stepwisefit(X(lstValid,:), yy(lstValid));
end
res = res(1:n);
yhat = y - res;