(Dynamic) Heterogeneous Panels
• Pooled Mean Group
• Mean Group
• Swamy Random coefficients
The xtpmg command
. x t p m g d .c d .y d .p i , l r (l .c y p i ) m g c o n s t (1) r e p l a c e e c (e c ) . c o n s d e f 1 [e c ]y =.75 . x t p m g d .c d .y d .p i , l r (l .c y p i ) d f e
. x t p m g d .c d (1/2).y d .p i i f y e a r >1962, e c (e c ) l r (l .c y p i ) m g r e p l a c e
. x t p m g d .c d .y d .p i , l r (l .c y p i ) f u l l
E x a m p l e s
be equal across panels.
d f
e specifies the dynamic fixed-effects estimator. All parameters, except intercepts, are constrained to regressions. m g specifies the mean-group estimator. This model fits parameters as averages o
f the N individual group coefficients.
coefficient vector to be equal across panels while allowing for group-specific short-run and adjustment p m g is the default and specifies the pooled mean-group estimator. This model constrains the long-run model is the type of estimator to be fitted and is one of the following:
listed by default.
f u l l specifies that all N cross-ction regression results be listed. Only the averaged coefficients are d i f f i c u l t will u a different steppin
g algorithm in nonconcave regions of the likelihood.
be ud only with option p m g . See model_options in [R ] m l for more information.
...], where algorithm is {n r |b b f g s |d d f p }. The b h h h algorithm is not compatible with x t m p g .
t e c h n i q u e () can t e c h n i q u e (algorithm_spec ) specifies m l optimization technique. algorithm_spec is algorithm [# [algorithm [#]] l e v e l (#) ts the confidence level; default is l e v e l (95).
O b t a i n i n g r o b u s t v a r i a n c e e s t i m a t e s .
variance covariance matrix of the estimators (VCE), but not the estimated coefficients; e [U ] 20.14 with repeated obrvations on individuals. c l u s t e r () affects the estimated standard errors and within groups. varname specifies to which group each obrvation belongs, e.g., c l u s t e r (p e r s o n i d ) in data c l u s t e r (varname ) specifies that the obrvations are independent across groups (clusters), but not necessarily n o c o n s t a n t suppress the constant term. This option cannot be ud with option d f e . with option p m g .
c o n s t r a i n t s (string ) specifies the constraints to be applie
d to th
e model. This option is currently ud only r e p l a c e overwrites the error-correction variable, i
f it exists.
e c (string ) is ud to specify the name o
f the newly created error-correction term; default is
__e c .
identification, the first listed variable will have its coefficient normalized to 1.
l r (varlist ) specifies the variables to be included when calculating the long-run cointegrating vector. For O p t i o n s
e_(it) is the error term. The assumed distribution of the error term depends on the model fitted.
b_1,...,b_q are q parameters to be estimated, and
x_(it) is a (1 x k) vector of covariates
a_1,...,a_p are p parameters to be estimated
beta is a (k x 1) vector of parameters
phi is the error correction speed of adjustment parameter to be estimated
where i={(1,...,N}; t={(1,...,T_i)},
d.y_it = phi*(y_(it-1)+beta*x_(it)) + d.y_(it-1)a_1+... + y_(it-p)a_p + d.x_(it)b_1+...+d.x_(it-q)b_q + e_(it) mean-group estimators. Consider the model
In addition to the traditional dynamic fixed-effects models, x t p m g allows for the pooled mean-group and x t p m g aids in the estimation of large-N and large-T panel-data models, where nonstationarity may be a concern.D e s c r i p t i o n
varlists may contain time-ries operators; e tsvarlist .
You must t s s e t your data before using x t p m g ; e t s s e t . l e v e l (#) t t e c h n i q u e (algorithm_spec ) d d i f f i c u l t f f u l l model ]
x t p m g depvar [indepvars ] [if ] [in ] [, l l r (varlist ) e e c (string ) r r e p l a c e c c o n s t r a i n t s (string ) n n o c o n s t a n t S y n t a x x t p m g Pooled mean-group, mean-group, and dynamic fixed-effects models
The xtrc command
[X T ] x t m i x e d , [X T ] x t r e g Online: [X T ] x t r c p o s t e s t i m a t i o n ; Manual: [X T ] x t r c
A l s o s e e
Swamy, P. 1970. Efficient inference in a random coefficient regression model.
Econometrica 38: 311-323.R e f e r e n c e
e (s a m p l e ) marks estimation sample
Functions group i predictor
e (V _p s ) matrix o
f variances for the best linear predictors; row i contains vec of variance matrix for e (V ) variance-covariance matrix of the estimators e (b e t a _p s ) matrix of best linear predictors e (S i
g m a ) Sigma hat matrix e (b ) coefficient vector Matrices e (p r e d i c t ) program ud to implement p r e d i c t
e (p r o p e r t i e s ) b V e (v c e t y p e ) title ud to label Std. Err. e (v c e ) vcetype specified in v c e () e (c h i 2t y p e ) W a l d ; type o
f model chi-squared test e (o f f s e t ) offt e (i v a r ) variable denotin
g groups e (t i t l e ) title in estimation output e (d e p v a r ) name of dependent variable e (c m d l i n e ) command as typed e (c m d ) x t r c Macros e (d f _c
h
i 2c ) degrees of freedom for comparison chi-squared test
e (c h i 2_c ) chi-squared for comparison test e (c h i 2) chi-squared e (g _a v g ) average group size e (g _m i n ) smallest group size e (g _m a x ) largest group size e (d
f _m ) model degrees of freedom e (N _
g ) number of groups e (N ) number of obrvations Scalars x t r c saves the following in e ():
S a v e d r e s u l t s
. x t r c i n v e s t m a r k e t s t o c k
. w e b u s e i n v e s t 2E x a m p l e
l e v e l (#); e [X T ] e s t i m a t i o n o p t i o n s . Reporting squares regression.
v c e (c o n v e n t i o n a l ), the default, us the conventionally derived variance estimator for generalized least asymptotic theory and that u bootstrap or jackknife methods; e [X T ] vce_options .
v c e (vcetype ) specifies the type of standard error reported, which includes types that are derived from SE b e t a s requests that the group-specific best linear predictors also be displayed.
n o c o n s t a n t , o f f s e t (varname ); e [X T ] e s t i m a t i o n o p t i o n s . Main O p t i o n s
x t r c fits the Swamy (1970) random-coefficients linear regression model.
D e s c r i p t i o n
See [X T ] x t r c p o s t e s t i m a t i o n for features available after estimation.
b y , s t a t s b y , and x i are allowed; e prefix . A panel variable must be specified; u x t s e t . l e v e l (#) t confidence level; default is l e v e l (95) Reporting v
c e (vcetype ) vcetype may be c o n v e n t i o n a l , b o o t s t r a p , or j a c k k n i f e
SE b e t a s display group-specific best linear predictors
o f f s e t (varname ) include varname in model with coefficient constrained to 1 n o c o n s t a n t suppress constant term Main options description x t r c depvar indepvars [if ] [in ] [, options ]
S y n t a x
[X T ] x t r c Random-coefficients regression
T i t l e also e: xtrc postestimation h e l p x t r c dialog: x t r c
1.The consumption Function in the OECD (Pesaran et al. 1999, JASA)
The first example that we examine is a standard consumption function of the Davidson et al. (1978) type for a sample of OECD countries. Similar specifications have also been estimated for a number of developing countries by Haque and Montiel (1989). We assume that the long-run consumption function is given by
1)
where c is the logarithm of real consumption per capita, y is the logarithm of real per capita disposable income, and πis the rate of inflation. Most theories of aggregate consumption would sugg
est that θ1, = 1. The PMG estimation procedure allows us to estimate a common long-run coefficient and test whether it is unity. The inflation variable, . π, is a proxy for various wealth effects, and we would expect θ2, < 0. We assume that all of the variables are I(1) and cointegrated, making u an 1(0) process for all i. In this application we take the maximum lag as being 1; thus the autoregressive distributed lag (ARDL) (1,1,1) equation is
2)
and the error correction equation is
3)
Where:
φ , and the long-run coefficients, θ1 and The error-correction speed of adjustment parameter,
i
θ2, are of primary interest.
MG: all parameters vary across countries
PMG: homogeneity of long run coefficients: θi=θ
Data: jasa2.dta
tst id year
panel variable: id (strongly balanced)
time variable: year, 1960 to 1993
delta: 1 unit
/*The pooled mean group estimator, ARDL (1,1,1)*/
•
Iteration 0: log likelihood = 2270.3017 (not concave)
Iteration 1: log likelihood = 2319.1636
Iteration 2: log likelihood = 2322.938
Iteration 3: log likelihood = 2326.7589
Iteration 4: log likelihood = 2327.0742
Iteration 5: log likelihood = 2327.0749
Iteration 6: log likelihood = 2327.0749
Pooled Mean Group Regression
(Estimate results saved as pmg)
Log Likelihood = 2327.075 ------------------------------------------------------------------------------ | Coef. Std. Err. z P>|z| [95% Conf. Interval] -------------+---------------------------------------------------------------- ec |
pi | -.4658438 .0567332 -8.21 0.000 -.5770388 -.3546488 y | .9044336 .0086815 104.18 0.000 .8874182 .9214491 -------------+---------------------------------------------------------------- SR |
ec | -.1998761 .0321683 -6.21 0.000 -.2629247 -.1368275 pi |
D1. | -.0182588 .0277523 -0.66 0.511 -.0726522 .0361347 y |
D1. | .3269355 .0574236 5.69 0.000 .2143873 .4394838 _cons | .1544507 .0216942 7.12 0.000 .1119307 .1969706 ------------------------------------------------------------------------------ EC:Long run estimates eq. 1)
SR: ECM eq. 3): average coefficients from the individual estimates In the output, the estimated long-run inflation elasticity is significantly negative, as expected. Also, the estimated income elasticity is significantly positive.
φ<⇒
0long run relation
i
Theoretically, the income elasticity is equal to one. This hypothesis is easily tested: •test [ec]y=1
( 1) [ec]y = 1
chi2( 1) = 121.18
Prob > chi2 = 0.0000
>>rejection of the null of unit income elasticity
/*The full option*/
The full option estimates and saves an N + 1 multiple-equation model. The first equation (labeled per option ec) prents the normalized cointegrating vector.
The remaining N equations list the group-specific short-run coefficients.
•xtpmg d.c d.pi d.y if year>=1962, lr(l.c pi y) ec(ec) replace full pmg
------------------------------------------------------------------------------
| Coef. Std. Err. z P>|z| [95% Conf. Interval]
-------------+----------------------------------------------------------------
ec |
pi | -.4658438 .0567332 -8.21 0.000 -.5770388 -.3546488
y | .9044336 .0086815 104.18 0.000 .8874182 .9214491
-------------+----------------------------------------------------------------
id_111 |
ec | -.0378815 .0240594 -1.57 0.115 -.0850371 .0092742
pi |
D1. | -.2114431 .0866912 -2.44 0.015 -.3813549 -.0415314
y |
D1. | .5195067 .055876 9.30 0.000 .4099918 .6290217
_cons | .0336383 .0147912 2.27 0.023 .0046481 .0626285
-------------+----------------------------------------------------------------
id_112 USA |
ec | -.0131804 .0551878 -0.24 0.811 -.1213466 .0949858
pi |
D1. | .0268604 .0720611 0.37 0.709 -.1143767 .1680975
y |
D1. | .8831993 .1193825 7.40 0.000 .649214 1.117185
_cons | .0093299 .0285998 0.33 0.744 -.0467247 .0653844
-------------+----------------------------------------------------------------
id_122 |
ec | -.3322236 .0857815 -3.87 0.000 -.5003523 -.1640949
pi |
D1. | -.2934725 .1395929 -2.10 0.036 -.5670696 -.0198754
y |
D1. | .0930621 .1391965 0.67 0.504 -.1797579 .3658821
_cons | .2540469 .0643696 3.95 0.000 .1278847 .380209
-------------+----------------------------------------------------------------
id_124 |
ec | -.1729619 .0478032 -3.62 0.000 -.2666545 -.0792692
pi |
D1. | .0507104 .0884418 0.57 0.566 -.1226324 .2240533
y |
D1. | .2197053 .0990893 2.22 0.027 .0254939 .4139168
_cons | .1712243 .0462131 3.71 0.000 .0806482 .2618004
-------------+----------------------------------------------------------------