Hi,
Looking through the internet for a way to handle ARDL for panel data it fell down onto Xtpmg. But I have a hard time understanding the setup I would need to do.
1. What is the best way to find the number of lags for my var, I found this code:
Regarding finding the optimal lags for my var with ARDL panel data. Is there any other way to find a better solution?
2. When I then find the optimal lag structure and implement them, how is the code in Stata? Is it like this?
or
Some info:
- T=8 N=70
- Two dependent variables
- One independent variable
- y1:I(1) x:I(0)
- y2:I(0) x:I(1)
Looking through the internet for a way to handle ARDL for panel data it fell down onto Xtpmg. But I have a hard time understanding the setup I would need to do.
1. What is the best way to find the number of lags for my var, I found this code:
Code:
forval i = 1/# { ardl y x1 if (country==`i'), maxlag(n n) matrix list e(lags) di }
2. When I then find the optimal lag structure and implement them, how is the code in Stata? Is it like this?
Code:
xtpmg Ln.y Ln.x,lr(l.y x) ec(ec) replace dfe cluster(country)
Code:
xtpmg Ln.y Ln.x,lr(l.y x) ec(ec) replace pmg
- T=8 N=70
- Two dependent variables
- One independent variable
- y1:I(1) x:I(0)
- y2:I(0) x:I(1)