21  Dynamic Model Applications with pdynmc

Model Setup

\[ \begin{split} emp_{i,t} &= \alpha_1 emp_{i,t-1} + \alpha_2 emp_{i,t-2} + \bbeta'(L) \bx_{it} + \lambda_t + \eta_i + \varepsilon_{i,t} \\ &= \alpha_1 emp_{i,t-1} + \alpha_2 emp_{i,t-2} \\ &\phantom{=}\quad + \beta_1 wage_{i,t} + \beta_2 wage_{i,t-1} \\ &\phantom{=}\quad + \beta_3 capital_{i,t} + \beta_4 capital_{i,t-1} + \beta_5 capital_{i,t-2} \\ &\phantom{=}\quad + \beta_6 output_{i,t} + \beta_7 output_{i,t-1} + \beta_8 output_{i,t-2} \\ &\phantom{=}\quad + \gamma_3 d_3 + \dots + \gamma_T d_T + \eta_i + \varepsilon_{i,t}, \end{split} \]

21.1 No time dummies

library(pdynmc)
data("EmplUK", package = "plm")
# Run pdynmc
m0 <- pdynmc(
    dat = EmplUK_log, varname.i = "firm", varname.t = "year",
    use.mc.diff = TRUE, use.mc.lev = FALSE, use.mc.nonlin = FALSE,
    include.y = TRUE, varname.y = "emp", lagTerms.y = 2,
    fur.con = TRUE, fur.con.diff = TRUE, fur.con.lev = FALSE,
    varname.reg.fur = c("wage", "capital", "output"), lagTerms.reg.fur = c(1,2,2),
    include.dum = FALSE,
    w.mat = "iid.err", std.err = "corrected",
    estimation = "onestep", opt.meth = "none" 
)
summary(m0)
mtest.fct(m0)
jtest.fct(m0)
wald.fct(m0, param = "all")
> summary(m0)

Dynamic linear panel estimation (onestep)
GMM estimation steps: 1

Coefficients:
           Estimate Std.Err.rob z-value.rob Pr(>|z.rob|)    
L1.emp      0.72011     0.14893       4.835      < 2e-16 ***
L2.emp     -0.09164     0.05816      -1.576      0.11503    
L0.wage    -0.61195     0.17805      -3.437      0.00059 ***
L1.wage     0.38730     0.18285       2.118      0.03418 *  
L0.capital  0.36127     0.05858       6.167      < 2e-16 ***
L1.capital -0.06120     0.07179      -0.852      0.39421    
L2.capital -0.02891     0.03515      -0.822      0.41108    
L0.output   0.65801     0.11697       5.625      < 2e-16 ***
L1.output  -0.53246     0.21663      -2.458      0.01397 *  
L2.output   0.01351     0.14734       0.092      0.92670    
---
Signif. codes:  0***0.001**0.01*0.05 ‘.’ 0.1 ‘ ’ 1

 35 total instruments are employed to estimate 10 parameters
 27 linear (DIF) 
 8 further controls (DIF) 
 no time dummies 
 
J-Test (overid restrictions):  42.68 with 25 DF, pvalue: 0.0152
F-Statistic (slope coeff):  2025.03 with 10 DF, pvalue: <0.001
F-Statistic (time dummies):  no time dummies included in estimation
Warning message:
In jtest.fct(object) :
  Hansen J-Test statistic is inconsistent when error terms are non-spherical.
> mtest.fct(m0)

    Arellano and Bond (1991) serial correlation test of degree 2

data:  1step GMM Estimation
normal = -0.50782, p-value = 0.6116
alternative hypothesis: serial correlation of order 2 in the error terms
> wald.fct(m0, param = "all")

    Wald test

data:  1step GMM Estimation
chisq = 2025, df = 10, p-value < 2.2e-16
alternative hypothesis: at least one time dummy and/or slope coefficient is not equal to zero

21.2 With time dummies

m2 <- pdynmc(
    dat = EmplUK_log, varname.i = "firm", varname.t = "year",
    use.mc.diff = TRUE, use.mc.lev = FALSE, use.mc.nonlin = FALSE,
    include.y = TRUE, varname.y = "emp", lagTerms.y = 2,
    fur.con = TRUE, fur.con.diff = TRUE, fur.con.lev = FALSE,
    varname.reg.fur = c("wage", "capital", "output"), lagTerms.reg.fur = c(1,2,2),
    include.dum = TRUE, dum.diff = TRUE, dum.lev = FALSE, varname.dum = "year",
    w.mat = "iid.err", std.err = "corrected", 
    estimation = "twostep", opt.meth = "none"
    )

summary(m2)
mtest.fct(m2)
jtest.fct(m2)
wald.fct(m2, param = "all")
> summary(m2)

Dynamic linear panel estimation (twostep)
GMM estimation steps: 2

Coefficients:
           Estimate Std.Err.rob z-value.rob Pr(>|z.rob|)    
L1.emp      0.62871     0.19341       3.251      0.00115 ** 
L2.emp     -0.06519     0.04505      -1.447      0.14790    
L0.wage    -0.52576     0.15461      -3.401      0.00067 ***
L1.wage     0.31129     0.20300       1.533      0.12528    
L0.capital  0.27836     0.07280       3.824      0.00013 ***
L1.capital  0.01410     0.09246       0.152      0.87919    
L2.capital -0.04025     0.04327      -0.930      0.35237    
L0.output   0.59192     0.17309       3.420      0.00063 ***
L1.output  -0.56599     0.26110      -2.168      0.03016 *  
L2.output   0.10054     0.16110       0.624      0.53263    
1979        0.01122     0.01168       0.960      0.33706    
1980        0.02307     0.02006       1.150      0.25014    
1981       -0.02136     0.03324      -0.642      0.52087    
1982       -0.03112     0.03397      -0.916      0.35967    
1983       -0.01799     0.03693      -0.487      0.62626    
1976       -0.02337     0.03661      -0.638      0.52347    
---
Signif. codes:  0***0.001**0.01*0.05 ‘.’ 0.1 ‘ ’ 1

 41 total instruments are employed to estimate 16 parameters
 27 linear (DIF) 
 8 further controls (DIF) 
 6 time dummies (DIF) 
 
J-Test (overid restrictions):  31.38 with 25 DF, pvalue: 0.1767
F-Statistic (slope coeff):  269.16 with 10 DF, pvalue: <0.001
F-Statistic (time dummies):  15.43 with 6 DF, pvalue: 0.0172