options crt memory=20 ; ? ================================================== ? [Dynamic Panel Data Estimation Using GMM (DIF)] ? [without Time Dummies] ? ================================================== ? Designed by Yoshitsugu Kitazawa ? First Design: 2003.11.29 Last Update: 2003.11.29 ? E-mail: kitazawa@ip.kyusan-u.ac.jp ? ================================================== ? ** This script realizes almost the same results ? ** as Ox version DPD except for the serial correlation ? ** tests. ? ** This script is written on the accumulation of ? ** the past technical supports by ? ** Professor Bronwyn Hall and Dr. Clint Cummins. ? ================================================== ? * T=6: All time periods used for the estimation ? * N=47: Number of individuals ? * t = 1 to T and i = 1 to N ? ? * Estimation Model without Time Dummy ? For all i (individual) and t (time), ? y_{it} = alp * y_{i,t-1} + bet * x_{it} + u_{it} ? and ? u_{it} = eta_i + v_{it} ? where y_{it} is the dependent variable, x_{it} is ? the explanatory variable, alp and beta are the ? parameter of interest to be estimated, eta_i is ? the fixed effect (the nuisance parameter), and ? v_{it} is the disturbance. In this model, ? E[eta_i x_{it}] =\ 0 for all T, and x_{it} is ? endogenously determined so that E[v_{it} x_{is}]=0 ? for s=1 to t-1. ? ? * Moment Restrictions to be used for GMM (DIF) ? * when estimating alp and bet in the model above. ? E[ du_{it} * y_{is} ] = 0, for s <= t-2 ; t = 3,...,T ? E[ du_{it} * x_{is} ] = 0, for s <= t-2 ; t = 3,...,T ? ? * References ? Arellano (2003): "Panel Data Econometrics", Oxford ? University Press, Great Britain. ? Arellano and Bond (1991): "Some test of specification ? for panel data: Monte Carlo evidence and an application ? to employment equations", Review of Economic Studies, ? 58, 277-297. ? Doornik, Arellano, and Bond (2002): "Panel Data ? estimation using DPD for Ox", ? http://www.nuff.ox.ac.uk/Users/Doornik/papers/dpd.pdf ? ? * See on detail ? http://www.ip.kyusan-u.ac.jp/J/keizai/kitazawa/SOFT/TSP_DPD1/index.htm ? ===================================================== input "cov1spdm.tsp" ; input "cov2stpm.tsp" ; input "evdgen.tsp" ; input "lm2test2.tsp" ; frml du3 dy3 - ( alp * dy2 + bet * dx3 ) ; frml du4 dy4 - ( alp * dy3 + bet * dx4 ) ; frml du5 dy5 - ( alp * dy4 + bet * dx5 ) ; frml du6 dy6 - ( alp * dy5 + bet * dx6 ) ; list eq_dif du3-du6 ; list zc_dif y1-y4 x1-x4 ; load(nrow=8, ncol=4) zm_dif ; 1 1 1 1 0 1 1 1 0 0 1 1 0 0 0 1 ? --- 1 1 1 1 0 1 1 1 0 0 1 1 0 0 0 1 ; mat neqx = ncol(zm_dif) ; freq n ; smpl 1 47 ; read(file="ydata.txt") code y1-y6 ; read(file="xdata.txt") code x1-x6 ; ? print y1-y6 ; ? print x1-x6 ; genr dy2 = y2 - y1 ; genr dy3 = y3 - y2 ; genr dy4 = y4 - y3 ; genr dy5 = y5 - y4 ; genr dy6 = y6 - y5 ; genr dx2 = x2 - x1 ; genr dx3 = x3 - x2 ; genr dx4 = x4 - x3 ; genr dx5 = x5 - x4 ; genr dx6 = x6 - x5 ; param alp bet ; title "" ; cov1spdm neqx zc_dif zm_dif ani1 ; mat ani1 = ani1 / 2 ; gmm(covoc=ani1, noiteroc, nooptcov, hetero, nma=0, maxit=100, silent, inst=zc_dif, mask=zm_dif) eq_dif ; print alp bet ; tstats(name=@rnms) @coef @vcov ; title "Sargan Test for 1 step estimation" ; evdgen sr1 ; set sargan = @gmmovid / sr1 ; print sargan ; cdf(chi, df=@novid) sargan ; title "Serial Correlation Tests, AR(1) and AR(2)" ; regopt(noprint) all ; lm2test2 ; regopt ; title "" ; regopt(noprint) all ; cov2stpm eq_dif zc_dif zm_dif ani2 ; regopt ; gmm(covoc=ani2, noiteroc, optcov, hetero, nma=0, maxit=100, silent, inst=zc_dif, mask=zm_dif) eq_dif ; print alp bet ; tstats(name=@rnms) @coef @vcov ; title "Sargan Test for 2 step estimation" ; set sargan = @gmmovid ; print sargan ; cdf(chi, df=@novid) sargan ; title "Serial Correlation Tests, AR(1) and AR(2)" ; regopt(noprint) all ; lm2test2 ; regopt ; stop ; end ;