lagSelect function

Select the optimal number of lags, given criteria

Select the optimal number of lags, given criteria

Determine the optimal number of lags for dynamic regression

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.

Returns

It returns an integer, indicating the optimal lags

Author(s)

Ho Tsung-wu tsungwu@ntnu.edu.tw, College of Management, National Taiwan Normal University.

Examples

#library(pdR) #data(inf19) #y<-inf19[,1] #lagSelect(y,maxp=25,ic="BIC")
  • Maintainer: Ho Tsung-wu
  • License: GPL (>= 2)
  • Last published: 2024-08-18

Useful links