auto.ardl: auto.ardl

Description Usage Arguments Details Value See Also Examples

Description

Searchs for the best ARDL model, given maximum lag for the explained variable y and regressors x.

Usage

1
2
auto.ardl(formula, data, subset = NULL, ymax = 4, xmax = 4, case = 3,
  ic = "bic", verbose = FALSE)

Arguments

formula

Formula as in y ~ x1 + x2 | x3 where x1 and x2 are tested for different lags up to xmax. Note that x3 is "fixed" so it is not lagged.

data

A dataframe or time referenced object with data in columns.

subset

(optional) Filter rows from the dataframe. Defaults to NULL.

ymax

(optional) Maximum lag of the dependent variable y. Defaults to 4.

xmax

(optional) Maximum lag of the explaining variable(s) x. Defaults to 4.

case

(optional) Number of the case according to PSS (2001) to chose which table to use.

ic

(optional) Information criteria used for selection. Can be "aic","bic","r2","ll". Defaults to "bic".

verbose

(optional) Lists all the models tested. Defaults to FALSE.

Details

This function selects the models to test, the actual estimation is done by ardl().

Value

An object of class ardl.

See Also

ardl

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
data(br_month)

# show the selection process with verbose=TRUE
taylor0 <- auto.ardl( mpr~cpi+prod+reer, data=br_month, ymax=4, xmax=c(4,4,4), verbose=TRUE )
summary( taylor0 )

# note the differences by varying the case (intercept and trend) specification 
phillips1 <- auto.ardl( cpi~mpr+prod+reer|d_lula, data=br_month, ymax=4, xmax=c(4,4,4), case=1 )
phillips2 <- auto.ardl( cpi~mpr+prod+reer|d_lula, data=br_month, ymax=4, xmax=c(4,4,4), case=3 )
phillips3 <- auto.ardl( cpi~mpr+prod+reer|d_lula, data=br_month, ymax=4, xmax=c(4,4,4), case=5 )
BIC(phillips1) # 86.42611 best!
BIC(phillips2) # 91.0541
BIC(phillips3) # 92.84055

# change the information criteria 
phillips4 <- auto.ardl( cpi~mpr+prod+reer|d_lula, data=br_month, ymax=4, xmax=c(4,4,4), ic="aic" )
phillips5 <- auto.ardl( cpi~mpr+prod+reer|d_lula, data=br_month, ymax=4, xmax=c(4,4,4), ic="r2" )
phillips6 <- auto.ardl( cpi~mpr+prod+reer|d_lula, data=br_month, ymax=4, xmax=c(4,4,4), ic="bic" )

fcbarbi/ardl documentation built on May 16, 2019, 12:05 p.m.