pmax: The lag maximum value

Description Usage Arguments Details Value Author(s) Examples

Description

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

Usage

1

Arguments

ts

Univariate time series.

Details

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

where T is number of observations.

Note: [1.6] = 1

Value

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

Author(s)

Hong Viet Minh

Examples

1
2
3
4
data(enrollment)
p<-pmax(enrollment)
library(urca)
summary(ur.df(enrollment,type="trend",lag=p,selectlag="BIC"))

Example output

Loading required package: MASS
Loading required package: TSA
Loading required package: leaps
Loading required package: locfit
locfit 1.5-9.1 	 2013-03-22
Loading required package: mgcv
Loading required package: nlme
This is mgcv 1.8-20. For overview type 'help("mgcv-package")'.
Loading required package: tseries

Attaching package: 'TSA'

The following objects are masked from 'package:stats':

    acf, arima

The following object is masked from 'package:utils':

    tar

Loading required package: TTR
Loading required package: urca

Attaching package: 'AnalyzeTS'

The following object is masked from 'package:base':

    pmax


############################################### 
# Augmented Dickey-Fuller Test Unit Root Test # 
############################################### 

Test regression trend 


Call:
lm(formula = z.diff ~ z.lag.1 + 1 + tt + z.diff.lag)

Residuals:
    Min      1Q  Median      3Q     Max 
-646.90 -210.10    0.95   97.00  620.42 

Coefficients:
              Estimate Std. Error t value Pr(>|t|)   
(Intercept) 4381.93814 1369.38734   3.200  0.01083 * 
z.lag.1       -0.36349    0.09832  -3.697  0.00494 **
tt           115.24678   37.49035   3.074  0.01327 * 
z.diff.lag     0.74518    0.18153   4.105  0.00266 **
---
Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

Residual standard error: 370.9 on 9 degrees of freedom
Multiple R-squared:  0.7584,	Adjusted R-squared:  0.6778 
F-statistic: 9.416 on 3 and 9 DF,  p-value: 0.003881


Value of test-statistic is: -3.6969 4.8746 7.3119 

Critical values for test statistics: 
      1pct  5pct 10pct
tau3 -4.38 -3.60 -3.24
phi2  8.21  5.68  4.67
phi3 10.61  7.24  5.91

AnalyzeTS documentation built on Dec. 9, 2019, 1:07 a.m.