Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: st: mean group
From
Nahla Samargandi <[email protected]>
To
"[email protected]" <[email protected]>
Subject
RE: st: mean group
Date
Tue, 21 Jun 2011 21:00:37 +0100
Hi,
I would like to ask
How I can impose the dummy variable in pmg estimator ,
if this is my pmg regressions
xtpmg d.gdpg d.lnhh d.lnca d.lnpop d.fl1, lr( l2.gdpg fl1) pmg replace ec(ec)
and
I want to add
if dincome==0
or
if dincome==1
where I can add it in the formula above.
Bes regards,
N________________________________________
From: [email protected] [[email protected]] On Behalf Of Nahla Samargandi [[email protected]]
Sent: 21 June 2011 20:01
To: [email protected]
Subject: RE: st: mean group
Dear Markus,
Thank you indeed for your illistartion.
I understood why Stata dropped my lagged dependent variable,
MY data over the period 1980 to 2008
And you said that I need the level of GDP IN THE PREVIOUS PERIOD (t-1)
SO IF I want to have the initial gdp per capita in the dynamic panel data ,
can i calculate it like this
1981-1980 , 1982-1981 , etc
And then I will get no value in 1980
It seems to me like taking the difference,
Regarding why I labelled the variables, because I tried to apply the mg using the same formula in your demo lab2, but unfortunately I could not.
This the pmg result
xtpmg d.gdpg d.lntradegdp d.education d.lnca d.lnpop d.fl1, lr( l2.gdpg fl1) pmg replace ec(ec)
Iteration 0: log likelihood = -3332.5242
Iteration 1: log likelihood = -3332.3657
Iteration 2: log likelihood = -3332.3647
Iteration 3: log likelihood = -3332.3647
Pooled Mean Group Regression
(Estimate results saved as pmg)
Panel Variable (i): cou Number of obs = 1303
Time Variable (t): year Number of groups = 52
Obs per group: min = 12
avg = 25.1
max = 28
Log Likelihood = -3332.365
------------------------------------------------------------------------------
D.gdpg | Coef. Std. Err. z P>|z| [95% Conf. Interval]
-------------+----------------------------------------------------------------
ec |
fl1 | 1.55204 .6458759 2.40 0.016 .2861466 2.817934
-------------+----------------------------------------------------------------
SR |
ec | -.0517315 .0498468 -1.04 0.299 -.1494294 .0459665
lntradegdp | -.7894347 1.204742 -0.66 0.512 -3.150686 1.571817
|
education |
D1. | 1.046573 7.152161 0.15 0.884 -12.97141 15.06455
|
lnca |
D1. | 5.211071 2.081382 2.50 0.012 1.131637 9.290505
|
lnpop |
D1. | -124.6077 94.11905 -1.32 0.186 -309.0777 59.86222
|
fl1 |
D1. | -6.441647 1.344954 -4.79 0.000 -9.077709 -3.805585
|
_cons | 7.016672 6.00329 1.17 0.242 -4.74956 18.7829
------------------------------------------------------------------------------
xtpmg d.gdpg d.lntradegdp d.education d.lnca d.lnpop d.fl1, lr( l2.gdpg fl1) pmg replace ec(ec)
now to order to estimate the mg
1-I generate
gen dgdp= d.gdpg (difference)
gen dfl1=d.fl1 (lag)
gen lgdpg= l. gdpg
nothing found where name expected
r(198);
Still I can’t apply mg using your command in my variables, I don’t know why, please could you help me.?
> 2- then
> ECM - MG
> xtmg dgdp llY llW llK dlW dlK , trend robust
>
> 2- nlcom ((_b[llW])/(-_b[llY])) ((_b[llK])/(-_b[llY])) , post
>
b[llY])) , post
finally , how I cam impose the dummy variable in the pmg and mg , because when I typed
xtpmg d.gdpg d.lntradegdp d.education d.lnca d.lnpop d.fl1, lr( l2.gdpg fl1) pmg replace ec(ec) if dincome= =1
It says option if not allowed r(198);
Best regards,
N
:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
From: [email protected] [[email protected]] On Behalf Of Markus Eberhardt [[email protected]]
Sent: 21 June 2011 15:04
To: [email protected]
Subject: Re: st: mean group
Well, Stata dropped your lagged dependent variable because it's not a
lagged dependent variable in the panel sense! "lngdpc0", I would
guess, is log of GDP per capita IN THE BASE YEAR. You cannot have a
variable that does not change over time in these dynamic regressions.
This is different from a cross-section regression, like in Mankiw,
Romer & Weil (1992, QJE). You need to have a variable which represents
the level of GDP IN THE PREVIOUS PERIOD (t-1), not in the base year.
Also, why do you label all variables with the prefix d-, even if they
seem to be levels variables?
In the example you quote, which is from my demo ado, you can see that
there are growth rates (d- prefix) and lagged levels (l- prefix) to
clearly distinguish them from each other. If you use this setup you'll
be able to run an ECM which delivers the results you're looking for.
m
Markus Eberhardt
ESRC Post-doctoral Research Fellow, Centre for the Study of African
Economies, Department of Economics, University of Oxford
Stipendiary Lecturer, St Catherine's College, Oxford
web: http://sites.google.com/site/medevecon/home
email: [email protected]
twitter: http://twitter.com/sjoh2052
mail: Centre for the Study of African Economies, Department of
Economics, Manor Rd, Oxford OX1 3UQ, England
On 21 June 2011 14:56, Nahla Samargandi <[email protected]> wrote:
> Thank you indeed for replying.
> There are more that one command regarding the MG which of them that use to estimate Error correction Model - TO estimate a long - short Run relationship (ARDL ) Autoregressive distributed lag )
>
> 1-
> ECM - MG
> xtmg dlY llY llW llK dlW dlK , trend robust
>
> 2-
> nlcom ((_b[llW])/(-_b[llY])) ((_b[llK])/(-_b[llY])) , post
>
> I got this result from the first one,
> gen dgdp=l.gdp etc
>
> xtmg dgdpg lngdpc0 deducation dlnca dlnpop dfl1, trend
>
> Pesaran & Smith (1995) Mean Group estimator
> All coefficients present represent averages across groups (cou)
> Coefficient averages computed as unweighted means
> Mean Group type estimation Number of obs = 1306
> Group variable: cou Number of groups = 52
> Obs per group: min = 12
> avg = 25.1
> max = 28
> Wald chi2(4) = 36.51
> Prob > chi2 = 0.0000
> ------------------------------------------------------------------------------
> dgdpg | Coef. Std. Err. z P>|z| [95% Conf. Interval]
> -------------+----------------------------------------------------------------
> lngdpc0 | (omitted)
> deducation | 8.75228 11.61385 0.75 0.451 -14.01045 31.51501
> dlnca | 5.732087 1.806081 3.17 0.002 2.192234 9.27194
> dlnpop | 500.2783 321.8142 1.55 0.120 -130.4659 1131.022
> dfl1 | -6.580965 1.245776 -5.28 0.000 -9.022641 -4.13929
> __000007_t | .2274885 .151299 1.50 0.133 -.0690521 .5240291
> _cons | -11.20187 8.003771 -1.40 0.162 -26.88897 4.485233
> ------------------------------------------------------------------------------
> Root Mean Squared Error (sigma): 4.1932
> Variable __000007_t refers to a group-specific linear trend.
> Share of group-specific trends significant at 5% level: 0.038 (= 2 trends)
>
> however , I cant interpret the result, because I need to know the short and long run effect , I don't think the estimation above is the right one for this.
>
> regarding this command
>
> nlcom ((_b[llW])/(-_b[llY])) ((_b[llK])/(-_b[llY])) , post
> could you tell me is this the right one ? if yes, where i have to replace my variable?
>
> Best regards,
> Nahla
>
> ________________________________________
> From: [email protected] [[email protected]] On Behalf Of Markus Eberhardt [[email protected]]
> Sent: 21 June 2011 14:20
> To: [email protected]
> Subject: Re: st: mean group
>
> xtpmg (Blackburn and Frank) with option -mg- gives you an ECM version
> (well, it reports the implied long-run results as well as the
> short-run results; an option to see the results country by country is
> also given).
>
> ARDL means autoregressive distributed lag, which is a levels
> regression with lagged dependent variable and contemporaneous and
> lagged covariates. This is mathematically equivalent to an ECM, which
> has the first difference of y as dependent variable and then adds
> lagged levels of y and x as well as contemporaneous and lagged
> differences of x (and lagged ones of y, too) as covariates. Hendry
> (1995) 'Dynamic Econometrics' has a discussion for a single time
> series how ARDL is the encompassing specification for a lot of dynamic
> models, including ECM. In terms of interpretation of coefficients you
> will get the same long-run results, although they're constructed
> differently. Furthermore, an ECM approach allows you to impose a
> long-run relationship (y-beta*x) as 'ecm' variable in order to focus
> on short-run dynamics and the speed of convergence/error correction
> mechanism.
>
> If you create lags manually (gen lx=l.x etc.) you can also use my xtmg command.
>
> Both xtpmg and xtmg commands can be found using -findit- in Stata.
>
> Best
> m
>
> Markus Eberhardt
> ESRC Post-doctoral Research Fellow, Centre for the Study of African
> Economies, Department of Economics, University of Oxford
> Stipendiary Lecturer, St Catherine's College, Oxford
>
> web: http://sites.google.com/site/medevecon/home
> email: [email protected]
> twitter: http://twitter.com/sjoh2052
> mail: Centre for the Study of African Economies, Department of
> Economics, Manor Rd, Oxford OX1 3UQ, England
>
>
>
>
> On 21 June 2011 13:30, Nahla Samargandi <[email protected]> wrote:
>> Hi,
>> I would like know the right command for mean group MG estimator in error correction model form (ARDL)developed by Pesaran 1999,
>>
>> thank you in advance for your help
>> *
>> * For searches and help try:
>> * http://www.stata.com/help.cgi?search
>> * http://www.stata.com/support/statalist/faq
>> * http://www.ats.ucla.edu/stat/stata/
>>
>
> *
> * For searches and help try:
> * http://www.stata.com/help.cgi?search
> * http://www.stata.com/support/statalist/faq
> * http://www.ats.ucla.edu/stat/stata/
> *
> * For searches and help try:
> * http://www.stata.com/help.cgi?search
> * http://www.stata.com/support/statalist/faq
> * http://www.ats.ucla.edu/stat/stata/
>
*
* For searches and help try:
* http://www.stata.com/help.cgi?search
* http://www.stata.com/support/statalist/faq
* http://www.ats.ucla.edu/stat/stata/
*
* For searches and help try:
* http://www.stata.com/help.cgi?search
* http://www.stata.com/support/statalist/faq
* http://www.ats.ucla.edu/stat/stata/
*
* For searches and help try:
* http://www.stata.com/help.cgi?search
* http://www.stata.com/support/statalist/faq
* http://www.ats.ucla.edu/stat/stata/