How to resolve the fminunc problem
이전 댓글 표시
Hey everybody, I am runing the post maximization of a financial friction model but each time I run it I have the following errors:
Error in ==> post_minus at 3
x = trans2(xtrans);
??? Error using ==> feval
Output argument "min_post" (and maybe others) not assigned during call to "F:\new
folders\67bis\Restricted Models (Table 3)\Fin Frictions Mod\Post
Maximization\post_minus.m>post_minus".
Error in ==> lineSearch>bracketingPhase at 103
f_alpha =
feval(funfcn{3},reshape(xInitial(:)+alpha*dir(:),sizes.xRows,sizes.xCols),varargin{:});
Error in ==> lineSearch at 48
[a,b,f_a,fPrime_a,f_b,fPrime_b,alpha,f_alpha,grad,exitflagBrckt,funcCountBrckt] = ...
Error in ==> fminusub at 208
[alpha,f,grad,exitflagLnSrch,funcCountLnSrch] = ...
Error in ==> fminunc at 367
[x,FVAL,GRAD,HESSIAN,EXITFLAG,OUTPUT] = fminusub(funfcn,x, ...
Error in ==> max_run_loop at 72
[xtrans,fval,exitflag,output,grad,hessian]...
You can find the code following this link https://www.mathworks.com/matlabcentral/fileexchange/63625-the-financial-friction-post-maximization-code-of-chang-and-fernandez--2013-
When I run this code with the original data of the author it works and even with another set of variable, but using this data I didn't succeed to obtain the posterior mode and the inverse of the Hessian matrix to finish the estimation procedure (the original code can be found in the homepage of Andrés Fernandez).
Please hepl me
Thanks in advance
Houda
댓글 수: 3
Walter Roberson
2017년 7월 5일
His page appears to be at https://sites.google.com/site/andresfernandezmartin8/research but I do not see links to code for this purpose there?
Houda
2017년 7월 5일
편집: Walter Roberson
2017년 7월 5일
Walter Roberson
2017년 7월 5일
Could you clarify which routine you are calling, and with what parameters?
채택된 답변
추가 답변 (0개)
카테고리
도움말 센터 및 File Exchange에서 Conditional Mean Models에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!