Page 1 of 1

GMM issue when estimating LR coefficients directly (ECM)

Posted: Sat Nov 18, 2017 1:08 am
by zoe_zz
Hello,

I am using EViews 9.5 and trying to estimate multiple error correction models by GMM. The loop generates equations and then deletes all equations having at least on insignificant coefficient (excl. a constant). The equation is written in the following form allowing me to see long-run coefficients immediately (I need this because I will have to impose homogeneity on the two coefficients in long run):

dlog(x)=c(1)+c(2)*dlog(z1)+c(3)*dlog(z2)+c(4)*dlog(k1)+c(5)*dlog(k2)-c(11)*[log(x(-1))-c(12)*log(z(-1))-c(13)*log(k(-1))] (z=z1+z2 and k=k1+k2)

The problem with this approach is that in vast majority (sometimes all) equations p-values almost reach 1 and parameters assume values well above one. On the other hand, it estimates the equation well (no issues with p-values or the size of coefficients) if I simply estimate the following (thus, in order to get LR parameters I have to divide c(12) and c(13) by -c(11):

dlog(x)=c(1)+c(2)*dlog(z1)+c(3)*dlog(z2)+c(4)*dlog(k1)+c(5)*dlog(k2)+c(11)*log(x(-1))+c(12)*log(z(-1))+c(13)*log(k(-1))

Thus, in the first option the loop deletes good equations due to some estimation issue when imposing restrictions/non-linearity in coefficients. It sometimes also gives me "near singular matrix" error and after doing some reading on this forum, I tried to re-set parameters before estimation by "param" command. However, it did not help me.

I do not understand what is going, the models are fine per se and it is just when I specify explicitly LR coefficients in an equation. Could you please give me some advice what else I could do? It is important for me to keep the specification as in the first equation - I need to set c(13) as (1-c(12)) and it obviously brings about the same problem as the first equation above.

Thank you,
Z

Re: GMM issue when estimating LR coefficients directly (ECM)

Posted: Tue Nov 21, 2017 10:36 am
by EViews Glenn
Can you send the workfile along with enough detail on what you are doing so that we can try to replicate the estimation settings?

Re: GMM issue when estimating LR coefficients directly (ECM)

Posted: Tue Nov 21, 2017 1:46 pm
by zoe_zz
Please see the workfile attached. The equation output was generated using another program but I saved it separately to show what the loop generates. If you take any equation and try to re-estimate it as it is given now you should get an error " singular matrix"; however, if you remove the parentheses and then click to re-estimate, the equation is estimated just fine. Each equation is the error correction model, (C12) and c(13) are long-run parameters estimated immediately using the expression in parentheses. If parenthesis are removed - c(12) and c(13) are not direct estimates of LR parameters. In this case, LR parameters are found as C(12)/c(11) and c(13)/c(11). The thing is that I want to impose restriction on LR coefficients so that they sum up to 1: (1-c(12))=c(13) (or (1-c(12)/c(11))=c(13)/c(11).

I hope this clarifies the issue.

Thank you for looking into this,
Z

Re: GMM issue when estimating LR coefficients directly (ECM)

Posted: Wed Nov 22, 2017 11:05 am
by EViews Glenn
Though I did not analyze the specification carefully, I did note that you are estimating models that are nonlinear in the coefficients, and that the coefficients of particular interest are quite large.

In cases like this where there are singularities, the first thing I do is to try different starting values, as starting values obviously can matter a great deal.

Arbitrarily setting starting values to .3 allows for estimation of all of the equations. I'll leave it to you to determine whether the particular roots that the optimizer found from these starting values produce reasonable parameter results.

Re: GMM issue when estimating LR coefficients directly (ECM)

Posted: Wed Nov 22, 2017 11:13 am
by zoe_zz
Another issue that I encounter with equations of the type 2 (without parentheses following C(11)), is an error of "square root of negative number" when trying to retrieve a vector of t-stats - in equation output some coefficients have NA for t-stats and p-values. Strangely, when I simply click to estimate same equation again, it estimates just fine and generates the full output. Do you know why would this be happening?

Re: GMM issue when estimating LR coefficients directly (ECM)

Posted: Wed Nov 22, 2017 2:02 pm
by zoe_zz
Glenn, thank you for the reply. I did try setting starting values before and it did not work. I tried again now by using a command param c(1) .3 c(2) .3 c(3) .3 c(4) .3 c(5) .3 c(6) .3 c(7) .3 c(8) .3 c(9) .3 c(10) 0.3. Am I doing this right? This line before the line that estimates the equation does not help unfortunately - I still get same equation output with extra large coefficients and high p-values. How did you set the parameter starting values?

Re: GMM issue when estimating LR coefficients directly (ECM)

Posted: Thu Nov 23, 2017 5:09 am
by zoe_zz
Please ignore the last post - I realised I should call coefficients by their names and not by order when setting initial values. It seems to work now. Thanks!