pgmm: Generalized Method of Moments (GMM) Estimation for Panel Data

Description Usage Arguments Details Value Author(s) References See Also Examples

View source: R/pgmm.R

Description

Generalized method of moments estimation for static or dynamic models with panel data.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
pgmm(formula, data, subset, na.action,
     effect = c("twoways", "individual"),
     model = c("onestep", "twosteps"),
     collapse = FALSE,
     lost.ts = NULL,
     transformation = c("d", "ld"),
     fsm = NULL, index = NULL, ...) 
## S3 method for class 'pgmm'
summary(object, robust = TRUE, time.dummies = FALSE, ...)
## S3 method for class 'summary.pgmm'
print(x, digits = max(3, getOption("digits") - 2),
    width = getOption("width"), ...)

Arguments

formula

a symbolic description for the model to be estimated. The preferred interface is now to indicate a multi–part formula, the first two parts describing the covariates and the GMM instruments and, if any, the third part the 'normal' instruments,

object,x

an object of class "pgmm",

data

a data.frame (neither factors nor character vectors will be accepted in data.frame),

subset

see lm,

na.action

see lm,

effect

the effects introduced in the model, one of "twoways" (the default) or "individual",

model

one of "onestep" (the default) or "twosteps",

collapse

if TRUE, the GMM instruments are collapsed,

lost.ts

the number of lost time series: if NULL, this is automatically computed. Otherwise, it can be defined by the user as a numeric vector of length 1 or 2. The first element is the number of lost time series in the model in difference, the second one in the model in level. If the second element is missing, it is set to the first one minus one,

transformation

the kind of transformation to apply to the model: either "d" (the default value) for the “difference GMM” model or "ld" for the “system GMM”,

fsm

the matrix for the one step estimator: one of "I" (identity matrix) or "G" (=D'D where D is the first–difference operator) if transformation="d", one of "GI" or "full" if transformation="ld",

index

the indexes,

digits

digits,

width

the maximum length of the lines in the print output,

robust

if TRUE, robust inference is performed in the summary,

time.dummies

if TRUE, the estimated coefficients of time dummies are present in the table of coefficients,

...

further arguments.

Details

pgmm estimates a model for panel data with a generalized method of moments (GMM) estimator. The description of the model to estimate is provided with a multi–part formula which is (or which is coerced to) a Formula object. The first right–hand side part describes the covariates. The second one, which is mandatory, describes the GMM instruments. The third one, which is optional, describes the 'normal' instruments. By default, all the variables of the model which are not used as GMM instruments are used as normal instruments with the same lag structure as the one specified in the model.

y~lag(y, 1:2)+lag(x1, 0:1)+lag(x2, 0:2) | lag(y, 2:99) is similar to y~lag(y, 1:2)+lag(x1, 0:1)+lag(x2, 0:2) | lag(y, 2:99) | lag(x1, 0:1)+lag(x2, 0:2) and indicates that all lags from 2 of y are used as GMM instruments.

transformation indicates how the model should be transformed for the estimation. "d" gives the “difference GMM” model (see Arellano and Bond (1991)), "ld" the “system GMM” model (see Blundell and Bond (1998)).

pgmm is an attempt to adapt GMM estimators available within the DPD library for GAUSS (see Arellano and Bond (1998)) and Ox (see Doornik, Arellano and Bond (2006)) and within the xtabond2 library for Stata (see Roodman (2009)).

Value

An object of class c("pgmm","panelmodel"), which has the following elements:

coefficients

the vector (or the list for fixed effects) of coefficients,

residuals

the vector of residuals,

vcov

the covariance matrix of the coefficients,

fitted.values

the vector of fitted values,

df.residual

degrees of freedom of the residuals,

model

a list containing the variables used for the estimation for each individual,

W

a list containing the instruments for each individual (two lists in case of “sys–GMM”),

A1

the weighting matrix for the one–step estimator,

A2

the weighting matrix for the two–steps estimator,

call

the call.

It has print, summary and print.summary methods.

Author(s)

Yves Croissant

References

Arellano, M. and Bond, S. (1991) Some Tests of Specification for Panel Data: Monte Carlo Evidence and an Application to Employment Equations, The Review of Economic Studies, 58(2), 1991, pp. 227–297.

Arellano, M. and Bond, S. (1998) Dynamic Panel Data Estimation Using DPD98 for GAUSS: A Guide for Users.

Blundell, R. and Bond, S. (1998) Initial Conditions and Moment Restrictions in Dynamic Panel Data Models, Journal of Econometrics, vol. 87(1), pp. 115–143.

Doornik, J., Arellano, M. and Bond, S. (2006) Panel Data Estimation using DPD for Ox. http://www.doornik.com/download/oxmetrics7/Ox_Packages/dpd.pdf

Roodman, D. (2009) How to do xtabond2: An introduction to difference and system GMM in Stata, Stata Journal, vol. 9(1), pp. 86–136. http://www.stata-journal.com/article.html?article=st0159.

See Also

sargan for Sargan tests and mtest for Arellano–Bond's tests of serial correlation. dynformula for dynamic formulas (deprecated).

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
data("EmplUK", package = "plm")

## Arellano and Bond (1991), table 4 col. b 
z1 <- pgmm(log(emp) ~ lag(log(emp), 1:2) + lag(log(wage), 0:1)
           + log(capital) + lag(log(output), 0:1) | lag(log(emp), 2:99),
            data = EmplUK, effect = "twoways", model = "twosteps")
summary(z1, robust = FALSE)

## Blundell and Bond (1998) table 4 (cf. DPD for OX p. 12 col. 4)
z2 <- pgmm(log(emp) ~ lag(log(emp), 1)+ lag(log(wage), 0:1) +
           lag(log(capital), 0:1) | lag(log(emp), 2:99) +
           lag(log(wage), 2:99) + lag(log(capital), 2:99),        
           data = EmplUK, effect = "twoways", model = "onestep", 
           transformation = "ld")
summary(z2, robust = TRUE)

## Not run: 
## Same with the old formula or dynformula interface
## Arellano and Bond (1991), table 4, col. b 
z1 <- pgmm(log(emp) ~ log(wage) + log(capital) + log(output),
            lag.form = list(2,1,0,1), data = EmplUK, 
            effect = "twoways", model = "twosteps",
            gmm.inst = ~log(emp), lag.gmm = list(c(2,99)))
summary(z1, robust = FALSE)

## Blundell and Bond (1998) table 4 (cf DPD for OX p. 12 col. 4)
z2 <- pgmm(dynformula(log(emp) ~ log(wage) + log(capital), list(1,1,1)), 
            data = EmplUK, effect = "twoways", model = "onestep", 
            gmm.inst = ~log(emp) + log(wage) + log(capital), 
            lag.gmm = c(2,99), transformation = "ld")
summary(z2, robust = TRUE)

## End(Not run)

Example output

Loading required package: Formula
Twoways effects Two steps model

Call:
pgmm(formula = log(emp) ~ lag(log(emp), 1:2) + lag(log(wage), 
    0:1) + log(capital) + lag(log(output), 0:1) | lag(log(emp), 
    2:99), data = EmplUK, effect = "twoways", model = "twosteps")

Unbalanced Panel: n=140, T=7-9, N=1031

Number of Observations Used:  611 

Residuals
      Min.    1st Qu.     Median       Mean    3rd Qu.       Max. 
-0.6190677 -0.0255683  0.0000000 -0.0001339  0.0332013  0.6410272 

Coefficients
                        Estimate Std. Error  z-value  Pr(>|z|)    
lag(log(emp), 1:2)1     0.474151   0.085303   5.5584 2.722e-08 ***
lag(log(emp), 1:2)2    -0.052967   0.027284  -1.9413 0.0522200 .  
lag(log(wage), 0:1)0   -0.513205   0.049345 -10.4003 < 2.2e-16 ***
lag(log(wage), 0:1)1    0.224640   0.080063   2.8058 0.0050192 ** 
log(capital)            0.292723   0.039463   7.4177 1.191e-13 ***
lag(log(output), 0:1)0  0.609775   0.108524   5.6188 1.923e-08 ***
lag(log(output), 0:1)1 -0.446373   0.124815  -3.5763 0.0003485 ***
---
Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

Sargan Test: chisq(25) = 30.11247 (p.value=0.22011)
Autocorrelation test (1): normal = -2.427829 (p.value=0.01519)
Autocorrelation test (2): normal = -0.3325401 (p.value=0.73948)
Wald test for coefficients: chisq(7) = 371.9877 (p.value=< 2.22e-16)
Wald test for time dummies: chisq(6) = 26.9045 (p.value=0.0001509)
Twoways effects One step model

Call:
pgmm(formula = log(emp) ~ lag(log(emp), 1) + lag(log(wage), 0:1) + 
    lag(log(capital), 0:1) | lag(log(emp), 2:99) + lag(log(wage), 
    2:99) + lag(log(capital), 2:99), data = EmplUK, effect = "twoways", 
    model = "onestep", transformation = "ld")

Unbalanced Panel: n=140, T=7-9, N=1031

Number of Observations Used:  1642 

Residuals
      Min.    1st Qu.     Median       Mean    3rd Qu.       Max. 
-0.7530341 -0.0369030  0.0000000  0.0002882  0.0466069  0.6001503 

Coefficients
                         Estimate Std. Error z-value  Pr(>|z|)    
lag(log(emp), 1)         0.935605   0.026295 35.5810 < 2.2e-16 ***
lag(log(wage), 0:1)0    -0.630976   0.118054 -5.3448 9.050e-08 ***
lag(log(wage), 0:1)1     0.482620   0.136887  3.5257 0.0004224 ***
lag(log(capital), 0:1)0  0.483930   0.053867  8.9838 < 2.2e-16 ***
lag(log(capital), 0:1)1 -0.424393   0.058479 -7.2572 3.952e-13 ***
---
Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

Sargan Test: chisq(100) = 118.763 (p.value=0.097096)
Autocorrelation test (1): normal = -4.808434 (p.value=1.5212e-06)
Autocorrelation test (2): normal = -0.2800133 (p.value=0.77947)
Wald test for coefficients: chisq(5) = 11174.82 (p.value=< 2.22e-16)
Wald test for time dummies: chisq(7) = 14.71138 (p.value=0.039882)
Twoways effects Two steps model

Call:
pgmm(formula = log(emp) ~ log(wage) + log(capital) + log(output), 
    data = EmplUK, effect = "twoways", model = "twosteps", lag.form = list(2, 
        1, 0, 1), gmm.inst = ~log(emp), lag.gmm = list(c(2, 99)))

Unbalanced Panel: n=140, T=7-9, N=1031

Number of Observations Used:  611 

Residuals
      Min.    1st Qu.     Median       Mean    3rd Qu.       Max. 
-0.6190677 -0.0255683  0.0000000 -0.0001339  0.0332013  0.6410272 

Coefficients
                         Estimate Std. Error  z-value  Pr(>|z|)    
lag(log(emp), c(1, 2))1  0.474151   0.085303   5.5584 2.722e-08 ***
lag(log(emp), c(1, 2))2 -0.052967   0.027284  -1.9413 0.0522200 .  
log(wage)               -0.513205   0.049345 -10.4003 < 2.2e-16 ***
lag(log(wage), 1)        0.224640   0.080063   2.8058 0.0050192 ** 
log(capital)             0.292723   0.039463   7.4177 1.191e-13 ***
log(output)              0.609775   0.108524   5.6188 1.923e-08 ***
lag(log(output), 1)     -0.446373   0.124815  -3.5763 0.0003485 ***
---
Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

Sargan Test: chisq(25) = 30.11247 (p.value=0.22011)
Autocorrelation test (1): normal = -2.427829 (p.value=0.01519)
Autocorrelation test (2): normal = -0.3325401 (p.value=0.73948)
Wald test for coefficients: chisq(7) = 371.9877 (p.value=< 2.22e-16)
Wald test for time dummies: chisq(6) = 26.9045 (p.value=0.0001509)
Twoways effects One step model

Call:
pgmm(formula = dynformula(log(emp) ~ log(wage) + log(capital), 
    list(1, 1, 1)), data = EmplUK, effect = "twoways", model = "onestep", 
    transformation = "ld", gmm.inst = ~log(emp) + log(wage) + 
        log(capital), lag.gmm = c(2, 99))

Unbalanced Panel: n=140, T=7-9, N=1031

Number of Observations Used:  1642 

Residuals
      Min.    1st Qu.     Median       Mean    3rd Qu.       Max. 
-0.7530341 -0.0369030  0.0000000  0.0002882  0.0466069  0.6001503 

Coefficients
                      Estimate Std. Error z-value  Pr(>|z|)    
lag(log(emp), 1)      0.935605   0.026295 35.5810 < 2.2e-16 ***
log(wage)            -0.630976   0.118054 -5.3448 9.050e-08 ***
lag(log(wage), 1)     0.482620   0.136887  3.5257 0.0004224 ***
log(capital)          0.483930   0.053867  8.9838 < 2.2e-16 ***
lag(log(capital), 1) -0.424393   0.058479 -7.2572 3.952e-13 ***
---
Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

Sargan Test: chisq(100) = 118.763 (p.value=0.097096)
Autocorrelation test (1): normal = -4.808434 (p.value=1.5212e-06)
Autocorrelation test (2): normal = -0.2800133 (p.value=0.77947)
Wald test for coefficients: chisq(5) = 11174.82 (p.value=< 2.22e-16)
Wald test for time dummies: chisq(7) = 14.71138 (p.value=0.039882)

plm documentation built on March 18, 2018, 1:10 p.m.