
fmincon hessian problem
Posted:
Jun 16, 2009 12:17 PM


I have few likelihood functions prewritten. I try to optimize them through "fmincon" function. For my estimated parameters, I then want to find the Hessian computed at those values. Once I get the Hessian I am interested in taking the inverse of the hessian multiplied by minus, which is basically the Information Matrix. This Information matrix is the VarianceCovariance Matrix and the OnDiagonal elements give us the variance (Square root of it gives the standard error of the estimates). Unfortunatly, the some of the varcov matrix ondiagonal elements are negative which does not makes sense as the varcov has to be positive. Any help would be great, or any alternative way to compute standard errors.
% 10. Timevarying normal Copula lower = 5*ones(3,1); % in theory there are no constraints, but setting loose constraints sometimes helps in the numerical optimisation upper = 5*ones(3,1); theta0 = [log((1+kappa1)/(1kappa1));0;0]; [ kappa10 LL10, EXITFLAG, OUTPUT, LAMBDA, GRAD, HESSIAN] = fmincon('bivnorm_tvp1_CL',theta0,[],[],[],[],lower,upper,[],options,[u,v],kappa1) [LL10, rho10] = bivnorm_tvp1_CL(kappa10,[u,v],kappa1);

