Noorma
Noorma

Reputation: 1

stability test of ARDL model in R

I would like to estimate an ARDL model with R according to the following procedure: Econometrics Beat: Dave Giles' Blog: ARDL Models - Part II - Bounds Tests (this blog's author uses EViews)

Here is my ARDL model in R:

Step1 <- lm(dlX ~ dlX_1+dlY+dlY_1+lX_1+lY_1, data=DB, na.action = na.exclude)

where _1 means that I took one lag of the variable, l the natural log of the variable and d the first difference.

I unfortunately can not find how to perform the stability test of an ARDL model in R (I would like to test whether the inverse roots of the corresponding characteristic equation are lower than 1), which is an important step of the procedure described on Dave Giles’s Blog. He explains that an ARDL model must have "covariance stationarity".

Does a command exist in R to perform this test?

Upvotes: 0

Views: 564

Answers (1)

Quinten
Quinten

Reputation: 41603

I would suggest use this link for good explanation of the ARDL model in R:https://rpubs.com/cyobero/ardl. It says to use the libary(dynlm) and dynlm() function.

I will give a small example to give you an idea how this works:

library(dynlm)
# Sample data
okun <- data.frame(g = c(1.4, 2, 1.4, 1.5, 0.9, 1.5, 1.2, 1.5, 1.6, 1.7),
                   u = c(7.3, 7.2, 7, 7, 7.2, 7, 6.8, 6.6, 6.3, 6))

Data looks like this:

     g   u
1  1.4 7.3
2  2.0 7.2
3  1.4 7.0
4  1.5 7.0
5  0.9 7.2
6  1.5 7.0
7  1.2 6.8
8  1.5 6.6
9  1.6 6.3
10 1.7 6.0

Next convert your data to time series object and fit your model:

# Conver data to time series
okun$g <- ts(okun$g, start=c(1985,2),  frequency=4) # The data is quarterly and the earliest observation in our data set is 1985 Q2.  
okun$u <- ts(okun$u, start=c(1985, 2), frequency=4)

# Fitting your model:
okun.ardl10 <- dynlm(g ~ L(g, 1) + d(u, 1), data=okun)

Finally check your results:

# Check results
summary(okun.ardl10)

Output:

Time series regression with "ts" data:
Start = 1985(3), End = 1987(3)

Call:
dynlm(formula = g ~ L(g, 1) + d(u, 1), data = okun)

Residuals:
     Min       1Q   Median       3Q      Max 
-0.32745 -0.11617 -0.05351  0.08315  0.56196 

Coefficients:
            Estimate Std. Error t value Pr(>|t|)  
(Intercept)   1.5409     0.5249   2.935   0.0261 *
L(g, 1)      -0.1479     0.3530  -0.419   0.6898  
d(u, 1)      -1.0419     0.6578  -1.584   0.1643  
---
Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1

Residual standard error: 0.2956 on 6 degrees of freedom
Multiple R-squared:  0.3059,    Adjusted R-squared:  0.07452 
F-statistic: 1.322 on 2 and 6 DF,  p-value: 0.3344

Upvotes: 0

Related Questions