Monsuru
Monsuru

Reputation: 11

Stationary test using augmented dickey- fuller test

Am trying to do this but the test statistics does not include in my result

Adf.test(agric, alternative = c( "stationary","explosive"), k=trunc( (length (agric)-1)^(1/8)))

The out put only show p value dickey fuller value Pls I need someone should put me through on r how I can get the test statistic on this

Upvotes: 1

Views: 642

Answers (1)

hpesoj626
hpesoj626

Reputation: 3619

Is this from the tseries package? The full tutorial can be run like this.

library(tseries)
x <- rnorm(1000)
adf.test(x, alternative = c("stationary", "explosive"),
         k = trunc((length(x)-1)^(1/3)))

You should supply the vector object x to the function adf.test().

Edit: Try

library(urca)
ur.df(x)

Upvotes: 1

Related Questions