Page 1 of 1

gmm estimate for different countries

Posted: Mon Oct 14, 2013 2:46 am
by Alexf
Hi,

I’m writing my first program and I have some difficulties with a very simple thing.
I want to run a gmm regression for different countries: us uk eu15 eu17 jp ger au .

I set my gmm equation and I would like to obtain different gmm estimate , one for each country . I have a list of series ,in this case labs and infl, for all these countries. The program I wrote always run the same regession with the same instruments for only one country ( it iterates several times only the same gmm equation for au(Australia)). I wrote

Code: Select all

open ppp.wf1 [color=#FFFF00]smpl 1960:1 2013:3 For %j a au sw us uk sp it eu15 eu17 cn nd fn jp ger genr infl{%j}=400*log(cp{%j}/cp{%j}(-1)) genr inflpd{%j}=400*log(ipd{%j}/ipd{%j}(-1)) next for %k1 us uk eu15 eu17 jp ger au for %countries us uk eu15 eu17 jp ger au genr infl{%k1}=400*log(cp{%k1}/cp{%k1}(-1)) genr labs{%k1}=(ulc{%k1}/ipd{%k1})*0.123 labs{%k1}.hpf(lambda=1600) labs{%k1}_hp series labs{%k1}_c = labs{%k1} - labs{%k1}_hp equation {%countries}.gmm(method=converge, instwgt=HAC,instinfo=SIC,deriv=aa) infl{%k1} c infl{%k1}(+1) infl{%k1}(-1) labs{%k1}_c@ infl{%k1}(-2) infl{%k1}(-3) infl{%k1}(-4) infl{%k1}(-5) labs{%k1}_c(-1) labs{%k1}_c(-2) labs{%k1}_c(-3) labs{%k1}_c(-4) {%countries}.weakinst next next [/color]
What is wrong in the program?

I have to do a Bai- Perron test also. I did the “add in” for my eviews 7.1 and the test works for each single series for each single country , but how to make the program run it?

Thanks so much in advance for any kind of help!!

Re: gmm estimate for different countries

Posted: Mon Oct 14, 2013 10:27 am
by EViews Gareth
You don't need the %countries loop and the %k loop. They are the same loop. Remove the %countries loop, and then call your equation eq_{%k}

Re: gmm estimate for different countries

Posted: Tue Oct 22, 2013 8:55 am
by Alexf
I'm a little bit late but thanks so much Gareth.

I have an other question: how can I perform a bai-perron test for each ols equation in eviews 7.1?
If I write

Code: Select all

For %j a sd us uk it eu15 cn nd fn jp ger equation eq0_{%j}.ls inflpd{%j} c inflpd{%j}(-1) eq0_{%j}.baiperron next
I only get a bai-perron test table for the first country.
What is again wrong?
I would be very grateful for any feedback you might be able to give me
In any case, thanks again for your answer!