? ===== st3_dgp ================================================= proc st3_dgp ? *** Each PARAMETER of this function *** alpha ? + coefficient parameter (input) s2_eta ? + in individual effect (input) s2_v ? + in disturbance (input) prd_dgp ? + DGP periods (input) ymat ? + panel data of "y" (output) ; ? =============================================================== ? =============================================================== ? THE PROCEDURE of generating the data of carrying out the ? Monte Carlo simulation of Dynamic Panel Data Model for estimating ? in the Generalized Method of Moments. This DGP is able to allow ? for the initial condition w.r.t. the dependent variable. ? For detail, see Arellano and Bond (Review of Economic Studies, ? 1991, 283-288 ), Arellano and Bover (Journal of Econometrics, ? 1995, ), Blundell and Bond (IFS working paper, 1995) and so on. ? ? ------ Data Generating Process ---------------------------- ? ########################################################### ? * Dependent Variable ? y_{it} = alpha y_{i(t-1)} + eta_{i} + v_{it} ? ? ** Initial Value ? eta_{i} v_{i1} ? y_{i1} = ----------- + --------------------- ? 1 - alpha sqrt(1 - alpha^2) ? ? *** eta_{i} -- i.i.d. N(0, s_eta) ? (Additive Fixed Effect) ? *** v_{it} -- i.i.d. N(0, s_v) ? ########################################################### ? ? ----------------------------------------------------------- ? * INPUT ? ** coefficient parameters ? alpha : see above ? ** in indivisual effect (additive fixed effect) ? s2_eta : the variance of the individual effect ? eta_{i}, ? ** in disturbance (multiplicative fixed effect) ? s2_v : the variance of the disturbance ? ? *** the number of periods of DGP ? prd_dgp : How many period do you generate? ? ----------------------------------------------------------- ? *OUTPUT ? *** output the panel data of dependent and endogenous var ? ymat : panel data of dependent variables "y" ? from Monte Carlo above, matrix form ? =============================================================== ? =============================================================== ? --------------------------------------------------------------- local s_eta ; ? local eta0 ; local eta ; local s_v ; ? local v0 ; local y_lag1 ; local prd_lst ; list(first=prd_dgp, last=prd_dgp) prd_lst ; dot prd_lst ; local v1-v. ; ? in the disturbance local y1-y. ; ? the dependent variable, y_{it} enddot ; ? =================== Incipient Setting ========== ? * the individual specific effect (DGP) [eta, additive] set s_eta = sqrt(s2_eta) ; ? random(mean=0, stdev=1) eta0 ; ? genr eta = s_eta * eta0 ; random(mean=0, stdev=s_eta) eta ; ? * the individual specific effect (DGP) [eta, multiplicative] set s_v = sqrt(s2_v) ; ? random(mean=0, stdev=1) v0 ; ? genr v1 = s_v * v0 ; random(mean=0, stdev=s_v) v1 ; ? * the initial value of the dependent variable ( y_{i1} ) ? (DGP) genr y1 = eta / (1 - alpha) + v1 / sqrt(1 - alpha**2) ; ? ================================================ ? ======= the sequence of DGP of y =============== ? ----- the DGP of the dependent variables "y" ? ----- ranging from 1 to "prd_dgp" (argument) ? ----- [ time period of DGP ] genr y_lag1 = y1 ; list(first=2, last=prd_dgp) prd_lst ; dot prd_lst ; ? == Generate the disturbance at the period "t" ? random(mean=0, stdev=1) v0 ; ? genr v. = s_v * v0 ; random(mean=0, stdev=s_v) v. ; ? == Generate the dependent variable y_{it} =========== genr y. = alpha * y_lag1 + eta + v. ; ? * preserve the data of the dependent variable ? * "y_{it}" at period t to generate that of t+1 genr y_lag1 = y. ; ? ==================================================== enddot ; ? ================================================ ? * making matrix of ? * the number of indivisuals times the number of periods list(first=prd_dgp, last=prd_dgp) prd_lst ; dot prd_lst ; mmake ymat y1-y. ; enddot ; ? *************************************************************** endproc st3_dgp ; ? ===============================================================