powered by
Determine the optimal number of lags for dynamic regression
lagSelect(y, maxp, ic)
It returns an integer, indicating the optimal lags
A univariate time series data
the max number of lags
Information criteria, either "AIC" or "BIC"
Ho Tsung-wu <tsungwu@ntnu.edu.tw>, College of Management, National Taiwan Normal University.
Information criteria "AIC" and "BIC" use the R built-in functions.
#library(pdR) #data(inf19) #y<-inf19[,1] #lagSelect(y,maxp=25,ic="BIC")
Run the code above in your browser using DataLab