GMM issue when estimating LR coefficients directly (ECM)

For technical questions regarding estimation of single equations, systems, VARs, Factor analysis and State Space Models in EViews. General econometric questions and advice should go in the Econometric Discussions forum.

Moderators: EViews Gareth, EViews Moderator

zoe_zz
Posts: 6
Joined: Wed Dec 09, 2015 11:05 am

GMM issue when estimating LR coefficients directly (ECM)

Postby zoe_zz » Sat Nov 18, 2017 1:08 am

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

EViews Glenn
EViews Developer
Posts: 2682
Joined: Wed Oct 15, 2008 9:17 am

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

Postby EViews Glenn » Tue Nov 21, 2017 10:36 am

Can you send the workfile along with enough detail on what you are doing so that we can try to replicate the estimation settings?

zoe_zz
Posts: 6
Joined: Wed Dec 09, 2015 11:05 am

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

Postby zoe_zz » Tue Nov 21, 2017 1:46 pm

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
Attachments
output_.wf1
(87.62 KiB) Downloaded 17195 times

EViews Glenn
EViews Developer
Posts: 2682
Joined: Wed Oct 15, 2008 9:17 am

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

Postby EViews Glenn » Wed Nov 22, 2017 11:05 am

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.
Last edited by EViews Glenn on Tue Dec 05, 2017 10:59 am, edited 1 time in total.

zoe_zz
Posts: 6
Joined: Wed Dec 09, 2015 11:05 am

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

Postby zoe_zz » Wed Nov 22, 2017 11:13 am

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?

zoe_zz
Posts: 6
Joined: Wed Dec 09, 2015 11:05 am

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

Postby zoe_zz » Wed Nov 22, 2017 2:02 pm

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?

zoe_zz
Posts: 6
Joined: Wed Dec 09, 2015 11:05 am

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

Postby zoe_zz » Thu Nov 23, 2017 5:09 am

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!

mrpm
Posts: 2
Joined: Sun Feb 23, 2025 4:36 am

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

Postby mrpm » Mon Feb 24, 2025 9:04 am

Hi,

I am currently trying to implement a similar model. I have several questions regarding the optimal way of estimating an error correction model in Eviews when I have the potential issue of endogeneity in the regressor and might need to use GMM.

1) When I estimate the model below in two steps (using Cointreg for LR relationship and GMM for SR), I encounter different results relative to estimate it all in a single step using GMM. What would be the right way of doing it in eviews?

2) If using GMM in a single step, should my instruments (which are the past lags of dependent variable in regressors) be in log-level or change of log-level?

3) If I have in fact a total of 5 LR regressors, and I need to impose the restriction that them all sum up to one, but I still want to get the p-values, how would I go about that in the single-step GMM approach? and are the coefficients and p-values given in the output of the model 'ready to use' or do I need to do some transformation in these too? (just thinking in terms of what I saw in this post here: viewtopic.php?t=18720) and in this case, considering I have 5 LR coefficients, what should be my instrument variables (i.e. transformed versions of my original)?

4) I have also encountered the same problem the original author of the post, and I have tried to set initial values, but it did not work. Not sure if I am doing this part correctly, but I see the original author says you need to use the 'name' coeff. rather than order. What does that mean?

coef (12) beta

param beta(1) 0.2 beta(2) 0.3 beta(3) 0.1 beta(4) 0.1 beta(5) 0.0 beta(6) 0.0 beta(7) 0.5 beta(8) 0.5 beta(9) 0.3 beta(10) 0.3 beta(11) 0.0 beta(12) 0.0

This is the specification I am trying to run:

D(LOG(PC)) = beta(1) + beta(2)*D(LOG(LY)) + beta(3)*D(LOG(TY)) + beta(4)*D(LOG(PY)) + beta(5)*D(LOG(NFW(-1))) + beta(6)*D(LOG(FW(-1))) - beta(7)*(LOG(PC(-1)) - beta(8)*LOG(LY(-1)) - beta(9)*LOG(TY(-1)) - beta(10)*LOG(PY(-1)) - beta(11)*LOG(NFW(-2)) - beta(12)*LOG(FW(-2)))

mrpm
Posts: 2
Joined: Sun Feb 23, 2025 4:36 am

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

Postby mrpm » Tue Feb 25, 2025 11:28 pm

Hi - Can I follow up on the above. It is a urgent question


Return to “Estimation”

Who is online

Users browsing this forum: No registered users and 2 guests