Keywords - Function groups - @ A B C D E F G H I J K L M N O P Q R S T U V W X Y Z

Library: times
See also: kpss

Quantlet: adf
Description: Calculation of the two tabulated testvalues (the general one is tau) for the Augmented Dickey-Fuller Test of a unit root in an autoregressive process for with a constant. If the third argument is "trend" a linear trend is calculated. The third return value is a vector of critical values for tau.

Reference(s):

Link:
Usage: {rho,tau,critvalues}=adf(z,p{,trend})
Input:
y series to be estimated
p number of included past differences in the regression
trend string (not needed), a linear trend is calculated if trend = "trend"
Output:
rho scalar, testvalue
tau scalar, testvalue
critvalues vector, critical values (1%, 5%, 10%, 90%, 95% and 99%); these values are calculated for sample sizes (rows of y) greater than 500

Example:



library("times")

randomize(1234)

x=normal(1000)

x=cumsum(x)

{rho,tau,cv}=adf(x,7)

rho

tau

cv

; x is a random walk. thus we expect tau between -2.57 and -0.44

Result:



Contents of rho

[1,]   4.8222 

Contents of tau

[1,]  -1.8666 

Contents of cv

[1,]    -3.43 

[2,]    -2.86 

[3,]    -2.57 

[4,]    -0.44 

[5,]    -0.07 

[6,]      0.6 

Example:



library("times")

randomize(1234)

x=normal(1000)

x=cumsum(x)

{rho,tau,cv}=adf(x,7,"trend")

rho

tau

cv

; x is a random walk. thus we expect tau between -3.12 and -1.25

Result:



Contents of rho

[1,]   7.0198 

Contents of tau

[1,]  -2.0605 

Contents of cv

[1,]    -3.96 

[2,]    -3.41 

[3,]    -3.12 

[4,]    -1.25 

[5,]    -0.94 

[6,]    -0.33 


Library: times
See also: kpss

Keywords - Function groups - @ A B C D E F G H I J K L M N O P Q R S T U V W X Y Z

Author: Kleinow, Wuensche 20000509
(C) MD*TECH Method and Data Technologies, 21.9.2000