new; load y[181,1] = Bitresid; @ for a mixed process @ nobs=181; library optmum; #include optmum.ext; optset; ve = zeros(nobs,1); proc nls(b); local ve, i, k, vesq2, func; ve = zeros(nobs,1); i = 2; do until i > nobs-1; ve[i,1] = (1+b[2]*b[1])*y[i,1] - b[1]*y[i+1,1] -b[2]*y[i-1,1]; i = i+1; endo; ve = trimr(ve, 1, 1); vesq2 = -ln(pi) - ln(b[3]) - ln(1 + (ve^2/ ((b[3])^2))); func = - sumc(vesq2); retp(func); endp; /* b0 = 0.1|0.1|10; b0 = 0.1|0.1|5; */ b0 = 0.6|0.7|0.8; output file = bitopt3N.out reset; {b,f,g,ret}=optprt(optmum(&nls,b0)); hh=_opfhess; v=inv(hh); se=sqrt(diag(v)); tt=b./se; @ not valid for phi and psi @ a=b~se~tt; print a; end;