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 longrun 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 pvalues almost reach 1 and parameters assume values well above one. On the other hand, it estimates the equation well (no issues with pvalues 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/nonlinearity in coefficients. It sometimes also gives me "near singular matrix" error and after doing some reading on this forum, I tried to reset 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 (1c(12)) and it obviously brings about the same problem as the first equation above.
Thank you,
Z
GMM issue when estimating LR coefficients directly (ECM)
Moderators: EViews Gareth, EViews Moderator

 EViews Developer
 Posts: 2600
 Joined: Wed Oct 15, 2008 9:17 am
Re: GMM issue when estimating LR coefficients directly (ECM)
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)
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 reestimate it as it is given now you should get an error " singular matrix"; however, if you remove the parentheses and then click to reestimate, the equation is estimated just fine. Each equation is the error correction model, (C12) and c(13) are longrun 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: (1c(12))=c(13) (or (1c(12)/c(11))=c(13)/c(11).
I hope this clarifies the issue.
Thank you for looking into this,
Z
I hope this clarifies the issue.
Thank you for looking into this,
Z
 Attachments

 output_.wf1
 (87.62 KiB) Downloaded 47 times

 EViews Developer
 Posts: 2600
 Joined: Wed Oct 15, 2008 9:17 am
Re: GMM issue when estimating LR coefficients directly (ECM)
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.
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.
Last edited by EViews Glenn on Tue Dec 05, 2017 10:59 am, edited 1 time in total.
Re: GMM issue when estimating LR coefficients directly (ECM)
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 tstats  in equation output some coefficients have NA for tstats and pvalues. 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)
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 pvalues. How did you set the parameter starting values?
Re: GMM issue when estimating LR coefficients directly (ECM)
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!
Who is online
Users browsing this forum: Majestic12 [Bot] and 4 guests