lagSelect: Select the optimal number of lags, given criteria

View source: R/unitRoot.R

lagSelectR Documentation

Select the optimal number of lags, given criteria

Description

Determine the optimal number of lags for dynamic regression

Usage

lagSelect(y, maxp, ic)

Arguments

y

A univariate time series data

maxp

the max number of lags

ic

Information criteria, either "AIC" or "BIC"

Details

Information criteria "AIC" and "BIC" use the R built-in functions.

Value

It returns an integer, indicating the optimal lags

Author(s)

Ho Tsungwu <tsungwu@cc.shu.edu.tw>

Examples

#library(pdR)
#data(inf19)
#y<-inf19[,1]
#lagSelect(y,maxp=25,ic="BIC")

tsungwu/pdR documentation built on June 14, 2022, 6:43 a.m.