PLM package: Difference between PMG and PCCE function

29 Views Asked by At

What is the difference of pmg and PCCE function in package PLM? details of both is almost same in the description. I wanted to perform mg, pmg and CCE mg test on panel data using plm function. I thought pmg and pcce are the right function. can someone please confirm which function I shall use?

The reference provided for PMG function is of 2006, which talks about Common correlated effect (CCE) mean group or pool. I woder if PMG is without CCE in plm package or with CCE.

1

There are 1 best solutions below

0
Helix123 On

From the plm packages first vignette we see both function can estimate the common correlated effects MG (CCEMG) model (and also from ?plm::pmg and ?plm::pcce):

pmg: estimators for mean groups (MG), demeaned MG (DMG) and common correlated effects MG (CCEMG) for heterogeneous panel models

pcce: estimators for common correlated effects mean groups (CCEMG) and pooled (CCEP) for panel data with common factors

So, let's see if we can get the same estimates from both function with the parametrisation to estimate a "CCEMG" model:

library(plm)
data("Produc", package = "plm")
pProduc <- pdata.frame(Produc)
form <- log(gsp) ~ log(pcap) + log(pc) + log(emp) + unemp
pccemgmod   <- pcce(form, data = pProduc, model = "mg")
pmgccemgmod <- pmg (form, data = pProduc, model = "cmg")
common <- intersect(names(pccemgmod[["coefficients"]]), names(pmgccemgmod[["coefficients"]]))
(coef_pccemgmod   <- round(pccemgmod[["coefficients"]][common],   digits = 7))
#>  log(pcap)    log(pc)   log(emp)      unemp 
#>  0.0899850  0.0335784  0.6258657 -0.0031178
(coef_pmgccemgmod <- round(pmgccemgmod[["coefficients"]][common], digits = 7))
#>  log(pcap)    log(pc)   log(emp)      unemp 
#>  0.0899850  0.0335784  0.6258659 -0.0031178

You get the same results. pcce(., model = "mg") and pmg(., model = "cmg") estimate the same model but internally in a different way, hence coefficients might slightly diverge due to numerical precision when you look at many digits.

In the example output above, I have only stated the coefficents common to both model objects. For the "pmg-way" (object pmgccemgmod), you get an intercept and the coefficients of auxiluary variables used for that estimation approach as well, so the full picture is:

> (pmgccemgmod)

Model Formula: log(gsp) ~ log(pcap) + log(pc) + log(emp) + unemp

Coefficients:
  (Intercept)     log(pcap)       log(pc)      log(emp)         unemp         y.bar log(pcap).bar   log(pc).bar  log(emp).bar 
   -0.6741754     0.0899850     0.0335784     0.6258659    -0.0031178     1.0038005    -0.0491919    -0.0033198    -0.6978359 
    unemp.bar 
    0.0025544