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 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")

pdR documentation built on Sept. 11, 2024, 9:08 p.m.