[R] ADF test --time series

Jeff Newmiller jdnewmil at dcn.davis.CA.us
Tue Apr 30 15:06:26 CEST 2013


a) This looks like homework. The Posting Guide clearly indicates that this list is not for homework help.

b) This is a statistics theory question that happens to use R, not an R question that happens to be about statistics. Also off-topic per the Posting Guide... there are other forums for stats questions.
---------------------------------------------------------------------------
Jeff Newmiller                        The     .....       .....  Go Live...
DCN:<jdnewmil at dcn.davis.ca.us>        Basics: ##.#.       ##.#.  Live Go...
                                      Live:   OO#.. Dead: OO#..  Playing
Research Engineer (Solar/Batteries            O.O#.       #.O#.  with
/Software/Embedded Controllers)               .OO#.       .OO#.  rocks...1k
--------------------------------------------------------------------------- 
Sent from my phone. Please excuse my brevity.

Preetam Pal <lordpreetam at gmail.com> wrote:

>Hi all,
>
>I was running the adf test in R.
>
>
>CODE 1:
>
>adf.test(data$LOSS)
>
>        Augmented Dickey-Fuller Test
>
>data:  data$LOSS
>Dickey-Fuller = -1.9864, Lag order = 2, p-value = 0.5775
>alternative hypothesis: stationary
>
>
>CODE 2:
> adf.test(diff(diff(data$LOSS)))
>
>        Augmented Dickey-Fuller Test
>
>data:  diff(diff(data$LOSS))
>Dickey-Fuller = -6.9287, Lag order = 2, p-value = 0.01
>alternative hypothesis: stationary
>
>
>
>Is my interpretation correct:
>
>The original data( in code 1) is not stationary
>
>the twice differenced data (in code 2) is *stationary* and the order of
>the
>corresponding ARMA(p,q) model are *p=2* (as lag order in the output is
>2)
>and *q=0*;.i.e. the *AR coefficients for X(t-1) and X(t-2) are
>significant*,
>while those of X(t-3) onwards are insignificant.
>
>
>Appreciate your help.
>Thanks,
>Preetam



More information about the R-help mailing list