Code: Select all
nonlin(parmset=fullset) a>=0.0 b c d>=0.0 e>=0.0
frml gdp=....
compute a=1.0, b=2.0,.......
instruments constant gdp{1 to 2} .....
nlls(inst, frml=gdp,parmset=fullset,noprint) *
set abc / =gdp
mcov(lags=2, damp=1) / abc
# constant gdp{1 to 2}........
compute W =inv*(%CMOM)
nlls(inst, wmatrix=w,frml=gdp,robusterrors, parmset=fullset,lags=2,damp=1)
Without the sign restriction, it seems working well but sometimes when estimated over certain range of data, the coefficients are estimated with wrong sign and 1 of them is extremely high(not interpretable). I tried changing the initial values case by case, but I think maybe a sign restriction would better tackle the problem
Thanks