Hi Tom,
I have been using the following code to find the number of iterations needed for Simplex before using BFGS. For example, when I run the code, it tells me that it is converged at i=4. But when I use 4 to replace i in the first max (method=Simplex, iters=4,...) and re-run it, it tells me it is not converged. I was wondering whether you know where the problem is.
Thanks
anozman
LINGREG(NOPRINT) V0 / res
# Constant V1 V2 V3 V4…… V23
frml(lastreg,vector=beta) meanf
nonlin(parmset=meanparms) beta
set u = %resids
set uu = u^2
set h = %seesq
*
nonlin(parmset=garchparms) c shift
compute c=0.2,shift=5.0
frml varf = c+shift*V2
compute nu=6.0
*
source logskewtdensity.src
nonlin(parmset=distparms) lambda eta
compute eta=nu,lambda=0.0
*
do i=0,10
frml loglsst = (h=varf),(u=V0-meanf),(uu=u^2),(-0.5*log(h)+%logskewtdensity(u/sqrt(h),eta,lambda))
maximize(noprint,method=SIMPLEX,iters=i,parmset=meanparms+garchparms+distparms) loglsst
maximiz(print,method=bfgs,iters=2000,subiterations=1000000000,cvcrit=0.000000001,robust,LAGS=3,LWINDOW=NEWEYWEST,parmset=meanparms+garchparms+distparms) loglsst
if %converged==1;dis 'Theoretical Model Specification 1 is converged at' i
end do i
dis 'Total number of runs is' i
