? ================== evdgen =================== proc evdgen sigres ; ? procedure to generate sigma_v in Arellano and Bond (1991) for ? 1-step estimator for the dynamic panel data model. ? This is used for estimating the variance of the parameter estimate ? and for generating the Sargan test for 1-step estimation. ? It is assumed that the disturbances in the model is homoscedastic ? cross-sectionally and over time. ? The sigma_v is the estimate of the variance of the disturbance ? for the first-differenced equations. ? sig_v = residual' residual / (#eq * #obs - #param) ? where residual is ((#eq * #obs) by 1) vector. ? When GMM 1-step estimation, implement ? cov1stpd ... ani1 ; ? mat ani1 = ani1 / 2 ; ? gmm(..optcov ..) eqn ; ? evdgen sr1 ; ? set @gmmovid = @gmmovid / sr1 ; ? mat @vcov = @vcov * sr1 ; ? by Yoshitsugu Kitazawa, (2001, 11, 2) ? --------------------------------------------- local resv sigresp np tn ; mat resv = vec(@res) ; mat sigresp = resv' resv ; mat tn = nrow(resv) ; length @rnms np ; set sigres = sigresp / (tn - np) ; endproc evdgen ; ? ================== evdgen ===================