Originally posted by Sebastian Kripfganz
View Post
I am running ARDL model with the following two commands. I don't understand why different results are produced.
Code:
clear
set seed 1234
set obs 1000
gen y = uniform()
gen x1 = rt(5)
gen time = _n
tsset time
local ylist y
local xlist x1
local quantile "0.1 0.25 0.5"
local nq: word count `quantile'
di `nq'
local xnum: word count `xlist'
di `xnum'
tempname opt
local maxlags = 10
if ("`maxlags'" != "") {
ardl `ylist' `xlist', maxlag(`maxlags') aic ec1
mat `opt' = e(lags)
}
mat list `opt'
Code:
ARDL(1,1) regression
Sample: 11 - 1000 Number of obs = 990
R-squared = 0.5314
Adj R-squared = 0.5300
Log likelihood = -180.88505 Root MSE = 0.2911
------------------------------------------------------------------------------
D.y | Coef. Std. Err. t P>|t| [95% Conf. Interval]
-------------+----------------------------------------------------------------
ADJ |
y |
L1. | -1.062711 .0318044 -33.41 0.000 -1.125124 -1.000299
-------------+----------------------------------------------------------------
LR |
x1 |
L1. | .0191763 .0099109 1.93 0.053 -.0002725 .0386252
-------------+----------------------------------------------------------------
SR |
x1 |
D1. | .0070096 .007535 0.93 0.352 -.0077768 .021796
|
_cons | .5206504 .0181471 28.69 0.000 .485039 .5562619
------------------------------------------------------------------------------
. mat `opt' = e(lags)
. }
.
. mat list `opt'
__000000[1,2]
y x1
r1 1 1
Code:
ardl y x1, lags(1 1) ec1 // optimal lag equals to `opt'
ARDL(1,1) regression
Sample: 2 - 1000 Number of obs = 999
R-squared = 0.5334
Adj R-squared = 0.5320
Log likelihood = -186.9914 Root MSE = 0.2924
------------------------------------------------------------------------------
D.y | Coef. Std. Err. t P>|t| [95% Conf. Interval]
-------------+----------------------------------------------------------------
ADJ |
y |
L1. | -1.066707 .0316454 -33.71 0.000 -1.128807 -1.004608
-------------+----------------------------------------------------------------
LR |
x1 |
L1. | .0186711 .0098246 1.90 0.058 -.0006082 .0379504
-------------+----------------------------------------------------------------
SR |
x1 |
D1. | .0084251 .0074896 1.12 0.261 -.0062722 .0231223
|
_cons | .5239664 .0181209 28.92 0.000 .4884069 .559526
------------------------------------------------------------------------------
Which answer is correct?
Bests,
wanhai

Comment