sticky information model, fmincon function

1 回表示 (過去 30 日間)
Houda
Houda 2018 年 1 月 19 日
コメント済み: Houda 2018 年 1 月 24 日
Hey, I am using Reis (2009) model, and I just replicate his results using his data. Starting with the SIBE folder, to first get the mode of the posterior distribution with the SIGE_mode: I get the following errors (matlab 2015a):
Warning: R-square and the F statistic are not well-defined unless X has a column of ones.
Type "help regress" for more information.
> In regress (line 164)
In SIGE_mode (line 33)
Subscripted assignment dimension mismatch.
Error in SIGEv (line 32)
Omega(:,1:5)=PHI;
Error in SIGEloglik (line 44)
V=SIGEv(ma_m,ma_a,ma_g,ma_nu,ma_gam,Sigma);
Error in SIGEpost (line 25)
L = SIGEloglik(pars)'; % Minus Log-likelihood
Error in fmincon (line 534)
initVals.f = feval(funfcn{3},X,varargin{:});
Error in SIGE_mode (line 67)
[Mode fval a b c d hess] = ...
Caused by:
Failure in initial user-supplied objective function evaluation. FMINCON cannot continue.
How should I fix this?? thanks for your help Houda
  4 件のコメント
Walter Roberson
Walter Roberson 2018 年 1 月 20 日
I had to go to the dataverse site to find some of the files, but even that site did not have SIGE_mode . SIGE_mode is mentioned in one of the .doc files but it does not appear to be available.
Houda
Houda 2018 年 1 月 20 日
編集済み: Houda 2018 年 1 月 20 日
the code SIGE_mode is included in the zipped file attached above, I attach it again (file name 2008-0077_data), the folder that contains this code is SIBE folder. I am looking also to the codes in dataverse, I didn't know about it before you told me. Thanks

サインインしてコメントする。

採用された回答

Walter Roberson
Walter Roberson 2018 年 1 月 20 日
I see it now; I am not sure why I could not find it earlier.
The code in SIGEv has a bug unless N (the number of periods, configured in SIGE_mode) is less than or equal to T (the number of rows in the input data, read in SIGE_mode). You will need to reduce N (currently 100) to something <= 75
  5 件のコメント
Walter Roberson
Walter Roberson 2018 年 1 月 20 日
The code in SIGEv.m fails if N > T. I traced the source of N and T back to SIGE_mode where N is assigned in the line you indicate and T is assigned a few lines earlier as the number of rows of data read in.
Houda
Houda 2018 年 1 月 24 日
It works for N=74 Thanks dear Walter Houda

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeSolver Outputs and Iterative Display についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by