Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Short run coef. #23

Open
nipnipj opened this issue Aug 31, 2023 · 7 comments
Open

Short run coef. #23

nipnipj opened this issue Aug 31, 2023 · 7 comments

Comments

@nipnipj
Copy link

nipnipj commented Aug 31, 2023

Could anyone, please, confirm the following. I think the output is incorrect, the estimated coefficient of TBILL1M belongs to DUM0708 and vice versa.

multipliers(uecm, type = "sr")
         Term     Estimate Std. Error    t value     Pr(>|t|)
1 (Intercept) -0.004117161 0.01886963 -0.2181898 8.275179e-01
2     TBILL3M  0.014984312 0.01533846  0.9769109 3.298686e-01
3     TBILL1M  1.274725456 0.07200374 17.7035995 6.562244e-42
4     DUM0708 -0.426651174 0.07189549 -5.9343243 1.394578e-08
@Natsiopoulos
Copy link
Owner

I can check it if you post the results of the UECM model.

@nipnipj
Copy link
Author

nipnipj commented Aug 31, 2023

> summary(uecm) 

Time series regression with "ts" data:
Start = 2, End = 196

Call:
dynlm::dynlm(formula = full_formula, data = data, start = start, 
    end = end)

Residuals:
      Min        1Q    Median        3Q       Max 
-0.271644 -0.030401 -0.002058  0.027445  0.243267 

Coefficients:
               Estimate Std. Error t value Pr(>|t|)    
(Intercept)   -0.004117   0.018870  -0.218    0.828    
L(TBILL6M, 1) -0.554607   0.066150  -8.384 1.18e-14 ***
L(TBILL3M, 1)  1.111351   0.126289   8.800 8.80e-16 ***
L(TBILL1M, 1) -0.555433   0.075213  -7.385 4.82e-12 ***
DUM0708        0.014984   0.015338   0.977    0.330    
d(TBILL3M)     1.274725   0.072004  17.704  < 2e-16 ***
d(TBILL1M)    -0.426651   0.071895  -5.934 1.39e-08 ***
---
Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1

Residual standard error: 0.06478 on 188 degrees of freedom
Multiple R-squared:  0.8828,	Adjusted R-squared:  0.8791 
F-statistic: 236.1 on 6 and 188 DF,  p-value: < 2.2e-16

@Natsiopoulos
Copy link
Owner

Indeed! This is strange. Thank you for raising this issue!
Could you provide a reproducible example (data and code)?
I am afraid this is a serious mistake that I have to fix!

@nipnipj
Copy link
Author

nipnipj commented Aug 31, 2023

Sure.
bby.csv

model <- auto_ardl(
  TBILL6M ~ TBILL3M + TBILL1M + DUM0708,
  data = data, selection = "AIC",
  max_order = c(6,6,6,0),
  starting_order = c(1,0,0,0))

@Natsiopoulos
Copy link
Owner

Thank you.

So, some early finding:
If you run multipliers(ardl, type = "sr") instead of multipliers(uecm, type = "sr") it produces the correct estimations.
I am on it to find why it is messed up when you use uecm.

Regardless of this issue, you should probably use:
model <- auto_ardl( TBILL6M ~ TBILL3M + TBILL1M | DUM0708, data = data, selection = "AIC", max_order = c(6,6,6), starting_order = c(1,0,0))
as DUM0708 is a dummy variable. This may be part of the problem (but it shouldn't).

@nipnipj
Copy link
Author

nipnipj commented Sep 1, 2023

I've tested the package with another dataset. ARDL, CEC, ECM, SR & LR coefficients, F-statistic bound test, t-statistic bound test, look fine. Sample size is 47, tho.

@Natsiopoulos
Copy link
Owner

The problem arises when there is a 0 order. It messes the order of the rows (fortunately, not a methodological mistake, just a row.names issue). I am fixing it right now. I will keep you updated for more details tomorrow.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants