(2)生成滞后项:gen l_x=l.x(二阶滞后:gen l2_x=l2.x,以此类推) (3)回归并生成、保存AIC/BIC值: xtreg y l.x controls (单固定是这样,双固定就reghdfe,OLS就reg,都能用) estat ic(该代码可展示AIC/BIC值) est store m1(该代码用于esttab输出时能够输出储存的对象,m1什么的随便取名字) xtreg ...
(1)定义面板数据:xtset name yaer (2)生成滞后项:gen l_x=l.x(二阶滞后:gen l2_x=l2.x,以此类推)(3)回归并展示AIC/BIC值:xtreg y l.x controls(单固定是这样,双固定就reghdfe,OLS就reg,都能用)estat ic(该代码可展示AIC/BIC值)est store m1(该代码用于esttab输出时...
First observation age[1] Last observation age[_N] Current observation age[_n] Previous (lag) observation age[_n-1] Next (lead) observation age[_n+1] Observation 27 age[27] generate lagprice = price [_n-1] (生成滞后变量) generate difprice = price – price[_n-1] (做差分)。