Unverified Commit 592a42fe authored by Meryem Ayşe Yücel's avatar Meryem Ayşe Yücel Committed by GitHub
Browse files

Update ar_fit.m (#161)

* Update ar_fit.m

Fixing bug in filename stepwise->stepwisefit, and the relevant extracted output.

* Update ar_glm_final.m

Reducing the number of max iterations to 10 for the sake of computational time.
parent a383a3f3
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;
+1 −1
Original line number Diff line number Diff line
@@ -22,7 +22,7 @@ function [dmoco, beta, tstat, pval, sigma, CovB, dfe, w, P, f] = ar_glm_final( d
            
            res = y-X*B;
            
            Pmax = 100;
            Pmax = 10;
            a = robust_ar_fit(res, Pmax);
            f = [1; -a(2:end)];