library(forecast)
## Registered S3 method overwritten by 'quantmod':
## method from
## as.zoo.data.frame zoo
library(tseries)
x <- AirPassengers
plot(x)
La prueba de Dickey-Fuller Aumentado elimina la autocorrelación e indica si una serie es estacionaria o no.
Según los criterios:
• H0 = La serie tiene raíces unitarias (pvalue <0.05)
• Ha = La serie no tiene raíces unitarias (pvalue >0.05)
tseries::adf.test(x)
## Warning in tseries::adf.test(x): p-value smaller than printed p-value
##
## Augmented Dickey-Fuller Test
##
## data: x
## Dickey-Fuller = -7.3186, Lag order = 5, p-value = 0.01
## alternative hypothesis: stationary
En este caso existe estacionariedad y tiene raices unitarias.