MEANGROUP Procedure |
@MEANGROUP does pooled mean group estimation for panel data. Pooled mean group estimates the coefficient vector of the regression by an equally-weighted average of the individual estimates. @SWAMY is a similar procedure, but does the Swamy random coefficients GLS estimator.
@MeanGroup( options ) depvar start end
# list of regressors (in regression format)
Parameters
|
depvar |
dependent variable |
|
start, end |
range for regression. By default, the maximum range permitted by all variables involved in the regression. |
Options
SMPL=standard SMPL option [none]
[PRINT]/NOPRINT
TITLE="title for output" ["Pooled Mean Group"]
DEFINE=equation to define [none]
Variables Defined
|
%BETA |
estimates of mean of coefficient process (VECTOR) |
|
%XX |
estimates of covariance matrix of mean coefficient (SYMMETRIC) |
|
%%IBETAS |
individual coefficients (VECT[VECTOR]). %%IBETAS(i) is the coefficient vector for individual i. |
|
%%IXX |
individual covariance matrices (VECT[SYMMETRIC]). %%IXX(i) as the covariance matrix for individual i |
Example
*
* Based upon Greene, Econometric Analysis, 7th Edition
* Example 11.19 from p. 418-419
*
open data produc_fix.prn
calendar(panelobs=17,a) 1970:1
data(format=prn,org=columns,left=3) 1//1970:01 48//1986:01 yr p_cap hwy water util pc gsp emp unemp
*
* Log all variables except unemp
*
dofor s = gsp p_cap hwy water util pc emp
log s
end dofor
*
linreg gsp
# constant pc hwy water util emp unemp
@meangroup gsp
# constant pc hwy water util emp unemp
Sample Output
This shows the output from the LINREG (OLS) and @MEANGROUP. Both are weighted averages of the individual estimates, but LINREG gives "precision-weighted" averages (giving higher weights to the individuals with high X'X) and @MEANGROUP uses simple averages.
Linear Regression - Estimation by Least Squares
Dependent Variable GSP
Panel(17) of Annual Data From 1//1970:01 To 48//1986:01
Usable Observations 816
Degrees of Freedom 809
Centered R^2 0.9930534
R-Bar^2 0.9930018
Uncentered R^2 0.9999351
Mean of Dependent Variable 10.508849637
Std Error of Dependent Variable 1.021131864
Standard Error of Estimate 0.085422808
Sum of Squared Residuals 5.9033184420
Regression F(6,809) 19275.0232
Significance Level of F 0.0000000
Log Likelihood 853.1372
Durbin-Watson Statistic 0.1877
Variable Coeff Std Error T-Stat Signif
************************************************************************************
1. Constant 1.926004375 0.052503182 36.68357 0.00000000
2. PC 0.312023086 0.011087500 28.14188 0.00000000
3. HWY 0.058881719 0.015411448 3.82065 0.00014330
4. WATER 0.118580557 0.012356570 9.59656 0.00000000
5. UTIL 0.008555123 0.012354029 0.69250 0.48882423
6. EMP 0.549695456 0.015536879 35.38004 0.00000000
7. UNEMP -0.007270503 0.001383632 -5.25465 0.00000019
Linear Regression - Estimation by Pooled Mean Group
Dependent Variable GSP
Panel(17) of Annual Data From 1//1970:01 To 48//1986:01
Usable Observations 816
Degrees of Freedom 809
Mean of Dependent Variable 10.508849637
Std Error of Dependent Variable 1.021131864
Standard Error of Estimate 0.392344723
Sum of Squared Residuals 124.53291476
Durbin-Watson Statistic 0.0873
Variable Coeff Std Error T-Stat Signif
************************************************************************************
1. Constant 0.964589401 0.639786148 1.50767 0.13163780
2. PC 0.027555729 0.036106378 0.76318 0.44535501
3. HWY 0.086149959 0.102872837 0.83744 0.40234458
4. WATER 0.053177878 0.044939890 1.18331 0.23668581
5. UTIL 0.066369134 0.078099686 0.84980 0.39543615
6. EMP 1.041287097 0.067057858 15.52819 0.00000000
7. UNEMP -0.002475663 0.001438341 -1.72119 0.08521578
Copyright © 2026 Thomas A. Doan