Learn R Programming

AnalyzeTS (version 2.2)

pmax: The lag maximum value

Description

Choose number of lags for endogenous variable to be included for augmented Dickey-Fuller unit root test according Schwert (1989).

Usage

pmax(ts)

Arguments

ts
Univariate time series.

Value

Number of lags for endogenous variable to be included for augmented Dickey-Fuller unit root test according Schwert (1989).

Details

p_max = [12*(T/4)^1/4]

where T is number of observations.

Note: [1.6] = 1

Examples

Run this code
data(enrollment)
p<-pmax(enrollment)
library(urca)
summary(ur.df(enrollment,type="trend",lag=p,selectlag="BIC"))

Run the code above in your browser using DataLab