最简单的DF检验:dfuller varname
ADF,就是再加几个滞后项,这里的滞后项n自己填:dfuller varname, lag(n)
想看要检验ADF的变量对自己滞后项的回归,再加个reg命令:dfuller varname, lag(n) reg
再复杂的就是检验面板的单位根,使用xtunitroot,有好几种检验准则,比如llc,ht,fisher等等,根据自己需要的准则来检验,比如:xtunitroot llc varname
help xtunitroot
[XT] xtunitroot -- Panel-data unit-root tests
Syntax
Levin-Lin-Chu test
xtunitroot llc varname [if] [in] [, LLC_options]
Harris-Tzavalis test
xtunitroot ht varname [if] [in] [, HT_options]
Breitung test
xtunitroot breitung varname [if] [in] [, Breitung_options]
Im-Pesaran-Shin test
xtunitroot ips varname [if] [in] [, IPS_options]
Fisher-type tests (combining p-values)
xtunitroot fisher varname [if] [in], {dfuller | pperron} lags(#) [Fisher_options]
Hadri Lagrange multiplier stationarity test
xtunitroot hadri varname [if] [in] [, Hadri_options]