How to resolve the fminunc problem
Show older comments
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 Comments
Walter Roberson
on 5 Jul 2017
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
on 5 Jul 2017
Edited: Walter Roberson
on 5 Jul 2017
Walter Roberson
on 5 Jul 2017
Could you clarify which routine you are calling, and with what parameters?
Accepted Answer
More Answers (0)
Categories
Find more on Conditional Mean Models 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!