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

# [no subject]

```This is a topic that was raised before here:
http://www.stata.com/statalist/archive/2011-06/msg00919.html
but there was not a definitive answer to why.

use C:\jasa2.dta  ,clear
tsset id year
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
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:
xtmg  dc ldc dy ldy dpi ldpi lc ly lpi
nlcom (_b[ly]/(-_b[lc])) (_b[lpi]/(-_b[lc]))

*
*   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/
```