Hi everyone!
I'd like to create one table in Stata that summarizes the results of the following unit root tests for 12 variables (LCO2, LP, LA, LR, LN, LIND, LS, LU, LPD, LA2, LU2, LEI).
For each test, the test on the variables' first differences is also performed and should be included in the table:
//Fisher test
local vars LCO2 LP LA LR LN LIND LS LU LPD LA2 LU2 LEI
foreach var of local vars {
xtunitroot fisher `var', dfuller lags(0)
}
//First difference
local vars LCO2 LP LA LR LN LIND LS LU LPD LA2 LU2 LEI
foreach var of local vars {
xtunitroot fisher D.`var', dfuller lags(0)
}
///Philips–Perron test
local vars LCO2 LP LA LR LN LIND LS LU LPD LA2 LU2 LEI
foreach var of local vars {
xtunitroot fisher `var', pperron lags(0)
}
//First difference
local vars LCO2 LP LA LR LN LIND LS LU LPD LA2 LU2 LEI
foreach var of local vars {
xtunitroot fisher D.`var', pperron lags(0)
}
///Breutung test
local vars LCO2 LP LA LR LN LIND LS LU LPD LA2 LU2 LEI
foreach var of local vars {
xtunitroot breitung `var' if Year>1999
}
//First difference
local vars LCO2 LP LA LR LN LIND LS LU LPD LA2 LU2 LEI
foreach var of local vars {
xtunitroot breitung D.`var' if Year>2000
}
///Levin-Lin-Chiu test
local vars LCO2 LP LA LR LN LIND LS LU LPD LA2 LU2 LEI
foreach var of local vars {
xtunitroot llc `var' if Year>1999
}
//First difference
local vars LCO2 LP LA LR LN LIND LS LU LPD LA2 LU2 LEI
foreach var of local vars {
xtunitroot llc D.`var' if Year>2000
}
///Im-Pesaran-Shin test
local vars LCO2 LP LA LR LN LIND LS LU LPD LA2 LU2 LEI
foreach var of local vars {
xtunitroot ips `var'
}
//First difference
local vars LCO2 LP LA LR LN LIND LS LU LPD LA2 LU2 LEI
foreach var of local vars {
xtunitroot ips D.`var'
}
Is it possible to create a single table that summarizes the values of each test and their respective p-values in Stata?
Thank you in advance.
I'd like to create one table in Stata that summarizes the results of the following unit root tests for 12 variables (LCO2, LP, LA, LR, LN, LIND, LS, LU, LPD, LA2, LU2, LEI).
For each test, the test on the variables' first differences is also performed and should be included in the table:
//Fisher test
local vars LCO2 LP LA LR LN LIND LS LU LPD LA2 LU2 LEI
foreach var of local vars {
xtunitroot fisher `var', dfuller lags(0)
}
//First difference
local vars LCO2 LP LA LR LN LIND LS LU LPD LA2 LU2 LEI
foreach var of local vars {
xtunitroot fisher D.`var', dfuller lags(0)
}
///Philips–Perron test
local vars LCO2 LP LA LR LN LIND LS LU LPD LA2 LU2 LEI
foreach var of local vars {
xtunitroot fisher `var', pperron lags(0)
}
//First difference
local vars LCO2 LP LA LR LN LIND LS LU LPD LA2 LU2 LEI
foreach var of local vars {
xtunitroot fisher D.`var', pperron lags(0)
}
///Breutung test
local vars LCO2 LP LA LR LN LIND LS LU LPD LA2 LU2 LEI
foreach var of local vars {
xtunitroot breitung `var' if Year>1999
}
//First difference
local vars LCO2 LP LA LR LN LIND LS LU LPD LA2 LU2 LEI
foreach var of local vars {
xtunitroot breitung D.`var' if Year>2000
}
///Levin-Lin-Chiu test
local vars LCO2 LP LA LR LN LIND LS LU LPD LA2 LU2 LEI
foreach var of local vars {
xtunitroot llc `var' if Year>1999
}
//First difference
local vars LCO2 LP LA LR LN LIND LS LU LPD LA2 LU2 LEI
foreach var of local vars {
xtunitroot llc D.`var' if Year>2000
}
///Im-Pesaran-Shin test
local vars LCO2 LP LA LR LN LIND LS LU LPD LA2 LU2 LEI
foreach var of local vars {
xtunitroot ips `var'
}
//First difference
local vars LCO2 LP LA LR LN LIND LS LU LPD LA2 LU2 LEI
foreach var of local vars {
xtunitroot ips D.`var'
}
Is it possible to create a single table that summarizes the values of each test and their respective p-values in Stata?
Thank you in advance.
Comment