Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[no subject]

This is a topic that was raised before here:
but there was not a definitive answer to why.

use C:\jasa2.dta  ,clear
*which can be downloaded from
tsset id year
* Additional variables for xtmg
 gen dc=d.c
 gen lc=l.c
 gen dy=d.y
 gen dpi=d.pi
 gen lpi=l.pi
 gen ly=l.y
 gen ldc=l.d.c
 gen ldy=l.d.y
 gen ldpi=l.d.pi

*Example 1: Bivariate example: xtpmg, xtwest and xtmg
* Comparison of the Mean-Group Estimator in the ADL(1,1)
xtwest c y ,  mg lags(0) constant
xtpmg  d.c  d.y  , lr(l.c l.y) mg replace
xtmg  dc lc dy ly
nlcom (_b[ly]/(-_b[lc]))

*Example 2: Empirical application: The consumption function with c
(consumption) y (income) and pi (inflation)
* Compariosn of the MG estimator in the ADL(2,2,2)
xtwest c y pi ,  mg lags(1) constant
xtpmg  d.c l.d.c d.y l.d.y d.pi l.d.pi, lr(l.c l.y l.pi) mg replace
xtmg  dc ldc dy ldy dpi ldpi lc ly lpi
nlcom (_b[ly]/(-_b[lc])) (_b[lpi]/(-_b[lc]))

*   For searches and help try:

© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index