Mean Groups (MG), Demeaned MG (DMG) and Common Correlated Effects MG (CCEMG) estimators for heterogeneous panel models, possibly with common factors (CCEMG)
pmg(
formula,
data,
subset,
na.action,
model = c("mg", "cmg", "dmg"),
index = NULL,
trend = FALSE,
...
)
# S3 method for class 'pmg'
summary(object, ...)
# S3 method for class 'summary.pmg'
print(
x,
digits = max(3, getOption("digits") - 2),
width = getOption("width"),
...
)
# S3 method for class 'pmg'
residuals(object, ...)a symbolic description of the model to be estimated,
a data.frame,
see lm(),
see lm(),
one of "mg", "cmg", or "dmg",
the indexes, see pdata.frame(),
logical specifying whether an individual-specific trend has to be included,
further arguments.
an object of class pmg,
digits,
the maximum length of the lines in the print output,
An object of class c("pmg", "panelmodel") containing:
the vector of coefficients,
the vector of residuals,
the vector of fitted values,
the covariance matrix of the coefficients,
degrees of freedom of the residuals,
a data.frame containing the variables used for the estimation,
numeric, the R squared,
the call,
the matrix of individual coefficients from separate time series regressions.
pmg is a function for the estimation of linear panel models with
heterogeneous coefficients by various Mean Groups estimators. Setting
argument model = "mg" specifies the standard Mean Groups estimator, based on the
average of individual time series regressions. If model = "dmg"
the data are demeaned cross-sectionally, which is believed to
reduce the influence of common factors (and is akin to what is done
in homogeneous panels when model = "within" and effect = "time").
Lastly, if model = "cmg" the CCEMG estimator is
employed which is consistent under the hypothesis of
unobserved common factors and idiosyncratic factor loadings; it
works by augmenting the model by cross-sectional averages of the
dependent variable and regressors in order to account for the
common factors, and adding individual intercepts and possibly
trends.
Pesaran MH (2006). “Estimation and inference in large heterogeneous panels with a multifactor error structure.” Econometrica, 74(4), 967–1012.
data("Produc", package = "plm")
## Mean Groups estimator
mgmod <- pmg(log(gsp) ~ log(pcap) + log(pc) + log(emp) + unemp, data = Produc)
summary(mgmod)
#> Mean Groups model
#>
#> Call:
#> pmg(formula = log(gsp) ~ log(pcap) + log(pc) + log(emp) + unemp,
#> data = Produc)
#>
#> Balanced Panel: n = 48, T = 17, N = 816
#>
#> Residuals:
#> Min. 1st Qu. Median 3rd Qu. Max.
#> -0.0828078889 -0.0118150348 0.0004246566 0.0126479124 0.1189647497
#>
#> Coefficients:
#> Estimate Std. Error z-value Pr(>|z|)
#> (Intercept) 2.6722392 0.4126515 6.4758 9.433e-11 ***
#> log(pcap) -0.1048507 0.0799132 -1.3121 0.18950
#> log(pc) 0.2182539 0.0500862 4.3576 1.315e-05 ***
#> log(emp) 0.9334776 0.0750072 12.4452 < 2.2e-16 ***
#> unemp -0.0037216 0.0016427 -2.2655 0.02348 *
#> ---
#> Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
#> Total Sum of Squares: 849.81
#> Residual Sum of Squares: 0.33009
#> Multiple R-squared: 0.99961
## demeaned Mean Groups
dmgmod <- pmg(log(gsp) ~ log(pcap) + log(pc) + log(emp) + unemp,
data = Produc, model = "dmg")
summary(dmgmod)
#> Demeaned Mean Groups model
#>
#> Call:
#> pmg(formula = log(gsp) ~ log(pcap) + log(pc) + log(emp) + unemp,
#> data = Produc, model = "dmg")
#>
#> Balanced Panel: n = 48, T = 17, N = 816
#>
#> Residuals:
#> Min. 1st Qu. Median 3rd Qu. Max.
#> -0.0834415058 -0.0076164165 -0.0001225963 0.0078108813 0.1177008894
#>
#> Coefficients:
#> Estimate Std. Error z-value Pr(>|z|)
#> (Intercept) 0.0580979 0.1042881 0.5571 0.577466
#> log(pcap) -0.0629002 0.1021706 -0.6156 0.538133
#> log(pc) 0.1607882 0.0591334 2.7191 0.006546 **
#> log(emp) 0.8425585 0.0704896 11.9529 < 2.2e-16 ***
#> unemp -0.0050181 0.0020770 -2.4160 0.015693 *
#> ---
#> Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
#> Total Sum of Squares: 849.81
#> Residual Sum of Squares: 0.23666
#> Multiple R-squared: 0.99972
## Common Correlated Effects Mean Groups
ccemgmod <- pmg(log(gsp) ~ log(pcap) + log(pc) + log(emp) + unemp,
data = Produc, model = "cmg")
summary(ccemgmod)
#> Common Correlated Effects Mean Groups model
#>
#> Call:
#> pmg(formula = log(gsp) ~ log(pcap) + log(pc) + log(emp) + unemp,
#> data = Produc, model = "cmg")
#>
#> Balanced Panel: n = 48, T = 17, N = 816
#>
#> Residuals:
#> Min. 1st Qu. Median 3rd Qu. Max.
#> -0.0806338274 -0.0037117404 0.0003146628 0.0040206767 0.0438957373
#>
#> Coefficients:
#> Estimate Std. Error z-value Pr(>|z|)
#> (Intercept) -0.6741754 1.0445518 -0.6454 0.518655
#> log(pcap) 0.0899850 0.1176040 0.7652 0.444180
#> log(pc) 0.0335784 0.0423362 0.7931 0.427698
#> log(emp) 0.6258659 0.1071719 5.8398 5.225e-09 ***
#> unemp -0.0031178 0.0014389 -2.1668 0.030249 *
#> y.bar 1.0038005 0.1078874 9.3041 < 2.2e-16 ***
#> log(pcap).bar -0.0491919 0.2396185 -0.2053 0.837344
#> log(pc).bar -0.0033198 0.1576547 -0.0211 0.983200
#> log(emp).bar -0.6978359 0.2432887 -2.8683 0.004126 **
#> unemp.bar 0.0025544 0.0031848 0.8021 0.422505
#> ---
#> Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
#> Total Sum of Squares: 849.81
#> Residual Sum of Squares: 0.056978
#> Multiple R-squared: 0.99993