A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/zedtaha/nardl below:

zedtaha/nardl: nardl:An R package to estimate the nonlinear cointegrating autoregressive distributed lag model

nardl:An R package to estimate the nonlinear cointegrating autoregressive distributed lag model

In this package, we apply the ordinary least squares method to estimate the cointegrating nonlinear ARDL (NARDL) model in which short and long-run nonlinearities are introduced via positive and negative partial sum decompositions of the explanatory variables.Besides, we provide the CUSUM, CUSUMSQ model stability tests, model selection via aic and bic.

To dwonload the package you can just type install.packages("nardl") in R or Rstudio.

# load the package 
 library(nardl)

The data used in this example is the Indian yearly data of inflation rate and percentage food import to total import.

# formula food~inf or food~inf|I(inf^2)
# data the dataframe
# ic : c("aic","bic") criteria model selection
# maxlag the maximum lag number
# graph TRUE to show stability tests plot
# case case number 3 for (unrestricted intercert, no trend) and 5 (unrestricted intercept, unrestricted trend), 1 2 and 4 not supported

############################################
# Fit the nonlinear cointegrating autoregressive distributed lag model
############################################
# Load data
data(fod)
reg<-nardl(food~inf,fod,ic="aic",maxlag = 4,graph = TRUE,case=3)
summary(reg)

Cointegration bounds test
reg<-nardl(food~inf,fod,ic="aic",maxlag = 4,graph = TRUE,case=3)
pssbounds(case=reg$case,fstat=reg$fstat,obs=reg$obs,k=reg$k)

All code is licensed


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4