pmg: Mean Groups (MG), Demeaned MG and CCE MG estimators

Description Usage Arguments Details Value Author(s) References Examples

View source: R/est_mg.R

Description

Mean Groups (MG), Demeaned MG (DMG) and Common Correlated Effects MG (CCEMG) estimators for heterogeneous panel models, possibly with common factors (CCEMG)

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
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, ...)

Arguments

formula

a symbolic description of the model to be estimated,

data

a data.frame,

subset

see lm(),

na.action

see lm(),

model

one of c("mg", "cmg", "dmg"),

index

the indexes, see pdata.frame(),

trend

logical specifying whether an individual-specific trend has to be included,

...

further arguments.

object, x

an object of class pmg,

digits

digits,

width

the maximum length of the lines in the print output,

Details

pmg is a function for the estimation of linear panel models with heterogeneous coefficients by the Mean Groups estimator. 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: this latter 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.

Value

An object of class c("pmg", "panelmodel") containing:

coefficients

the vector of coefficients,

residuals

the vector of residuals,

fitted.values

the vector of fitted values,

vcov

the covariance matrix of the coefficients,

df.residual

degrees of freedom of the residuals,

model

a data.frame containing the variables used for the estimation,

call

the call,

sigma

always NULL, sigma is here only for compatibility reasons (to allow using the same summary and print methods as pggls),

indcoef

the matrix of individual coefficients from separate time series regressions.

Author(s)

Giovanni Millo

References

\insertRef

PESA:06plm

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
data("Produc", package = "plm")
## Mean Groups estimator
mgmod <- pmg(log(gsp) ~ log(pcap) + log(pc) + log(emp) + unemp, data = Produc)
summary(mgmod)

## demeaned Mean Groups
dmgmod <- pmg(log(gsp) ~ log(pcap) + log(pc) + log(emp) + unemp, 
             data = Produc, model = "dmg")
summary(dmgmod)

## Common Correlated Effects Mean Groups
ccemgmod <- pmg(log(gsp) ~ log(pcap) + log(pc) + log(emp) + unemp, 
                data = Produc, model = "cmg")
summary(ccemgmod) 

Example output

Loading required package: Formula
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       Mean    3rd Qu.       Max. 
-0.0828079 -0.0118150  0.0004247  0.0000000  0.0126479  0.1189647 

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 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       Mean    3rd Qu.       Max. 
-0.0834415 -0.0076164 -0.0001226  0.0000000  0.0078109  0.1177009 

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 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       Mean    3rd Qu.       Max. 
-0.0806338 -0.0037117  0.0003147  0.0000000  0.0040207  0.0438957 

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

plm documentation built on March 3, 2021, 1:12 a.m.