? ============================ cov1ssys ========================= proc cov1ssys neq ivs imask an1 ; ? This procedure makes a covariance matrix for the system GMM ? estimator. The structure of the covariance matrix is the same ? as one in p9 in "Panel Data estimation using DPD for Ox", ? edited by Doornik, Arellano, and Bond (June 20, 2001), except ? for the scaling. ? The system GMM estimator is introduced in Blundell and Bond ? (Journal of Econometrics, 1998) in detail. ? ? That is, for example, when T= 5, ? ? | 2 -1 0 0 0 | ? | -1 2 -1 0 0 | ? HD = | 0 -1 2 -1 0 | ? | 0 0 -1 2 -1 | ? | 0 0 0 -1 2 | ? ? | 1 0 0 0 0 | ? | 0 1 0 0 0 | ? I = | 0 0 1 0 0 | ? | 0 0 0 1 0 | ? | 0 0 0 0 1 | ? ? | 0 0 0 0 0 | ? | 0 0 0 0 0 | ? O = | 0 0 0 0 0 | ? | 0 0 0 0 0 | ? | 0 0 0 0 0 | ? ? H = | HD O | ? | O I | ? ? Remark: Write the ivs list in the following order: ? [Instruments List for Difference Equation] ? [Instruments List for Level Equation] ? and ? in gmm command, write the equation list ? in the following order: ? gmm(...) difference_eq_list level_eq_list ; ? ? This procedure is made by Yoshitsgu Kitazawa ? (probably August/03), refering to the cov1step.tsp ? procedure designed by Clint Cummins (12/17/97). ? neq - number of equations (time periods (T-2)*2), ? where first T-2 is number of 1st dif eq while ? last T-2 is number of level eq. ? ivs - a list of instrumental variables. ? imask - a ninst by neq matrix of zeros and ones that specifies ? which instruments are used for which equation. ? an1 - the covariance matrix estimate (returned). local h i i1 diagm ; local neqh neqhp1 ; ? Make the theoretical covariance matrix of the equation residuals ? (MA(1)). ? In TSP 4.4 (rev. 8/97), this can be done with the BAND option to ? MFORM: ?mmake i 2 -1; ? vector of band values, starting with main diagonal ?mform(band,nrow=neq) h = i; set neqh = neq / 2 ; set neqhp1 = neqh + 1 ; mat h = 2*ident(neq) ; if neq .gt. 2 ; then ; do ; do i = 2 neqh ; set i1 = i-1 ; set h(i,i1) = -1 ; enddo ; do i = neqhp1 neq ; set h(i,i) = h(i,i) / 2 ; enddo ; enddo ; moment(noprint) ivs ; ? @mom = (z'z)/@nob mat an1 = sym(h) # @mom ; ? ? Apply the mask to an1, to work around a bug in GMM ? that was fixed on 12/17/97 ? mat diagm = diag(vec(imask)); mat an1 = diagm'an1*diagm; endproc cov1ssys ; ? ==================================================================