lagSelect | R Documentation |
Determine the optimal number of lags for dynamic regression
lagSelect(y, maxp, ic)
y |
A univariate time series data |
maxp |
the max number of lags |
ic |
Information criteria, either "AIC" or "BIC" |
Information criteria "AIC" and "BIC" use the R built-in functions.
It returns an integer, indicating the optimal lags
Ho Tsung-wu <tsungwu@ntnu.edu.tw>, College of Management, National Taiwan Normal University.
#library(pdR)
#data(inf19)
#y<-inf19[,1]
#lagSelect(y,maxp=25,ic="BIC")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.