Learn R Programming

nardl (version 0.1.5)

nardl: Nonlinear ARDL function

Description

Nonlinear ARDL function

Usage

nardl(formula, data, p = NULL, q = NULL, ic = c("aic", "bic", "ll", "R2"),
  maxlags = TRUE, graph = FALSE, case = 3)

Arguments

formula

food~inf or food~inf|I(inf^2)

data

the dataframe

p

lags of dependent variable

q

lags of independent variables

ic

: c("aic","bic","ll","R2") criteria model selection

maxlags

if TRUE auto lags selection

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

Examples

Run this code
# NOT RUN {
############################################
# Fit the nonlinear cointegrating autoregressive distributed lag model
############################################
# Load data
data(fod)
############################################
#example 1: nardl with fixed p and q lags
############################################
reg<-nardl(food~inf,p=4,q=4,fod,ic="aic",maxlags = FALSE,graph = FALSE,case=3)
summary(reg)

############################################
# example 2:auto selected lags (maxlags=TRUE)
############################################
reg<-nardl(food~inf,fod,ic="aic",maxlags = TRUE,graph = FALSE,case=3)
summary(reg)

############################################
# example 3: Cusum and CusumQ plot (graph=TRUE)
############################################
reg<-nardl(food~inf,fod,ic="aic",maxlags = TRUE,graph = TRUE,case=3)

# }

Run the code above in your browser using DataLab