6  ACF y PACF en ARMA(p,q)

Author

Brayan Cubides

6.1 ACF de modelos AR

6.1.1 AR(1)

rm(list=ls(all=TRUE))
set.seed(123)

# Simulación AR(1)
xt <- arima.sim(list(ar = c(0.79)), n = 1000)
ts.plot(xt)

acf(xt)  # Decae de forma exponencial

6.1.2 AR(2)

# Simulación AR(2) con coeficientes 0.8 y -0.55
xt2 <- arima.sim(list(order = c(2,0,0), ar = c(0.8, -0.55)), n = 1000)
ts.plot(xt2)

acf(xt2)

6.1.3 AR(2) no estacionario (Diapositiva 52)

# Simulación AR(2) con coeficientes 1.5 y -0.75
xt3 <- arima.sim(list(order = c(2,0,0), ar = c(1.5, -0.75)), n = 1000)
ts.plot(xt3)

acf(xt3)  # Decae de forma sinusoidal

6.2 ACF de modelos MA

6.2.1 MA(1) positiva

yt1 <- arima.sim(list(ma = c(0.8)), n = 1000)
ts.plot(yt1)

acf(yt1)

6.2.2 MA(1) negativa

yt2 <- arima.sim(list(ma = c(-0.8)), n = 1000)
ts.plot(yt2)

acf(yt2)

6.2.3 MA(2)

yt3 <- arima.sim(list(ma = c(0.9, 0.8)), n = 1000)
ts.plot(yt3)

acf(yt3)

6.3 PACF de modelos AR

6.3.1 AR(1)

xt <- arima.sim(list(ar = c(0.79)), n = 1000)
ts.plot(xt)

par(mfrow = c(1,2))
acf(xt)
pacf(xt)

6.3.2 AR(2)

xt2 <- arima.sim(list(order = c(2,0,0), ar = c(0.8, -0.55)), n = 1000)
ts.plot(xt2)

par(mfrow = c(1,2))
acf(xt2)
pacf(xt2)

6.3.3 AR(2) no estacionario

xt3 <- arima.sim(list(order = c(2,0,0), ar = c(1.5, -0.75)), n = 1000)
ts.plot(xt3)

par(mfrow = c(1,2))
acf(xt3)
pacf(xt3)

6.4 PACF de modelos MA

6.4.1 MA(1) positiva

yt1 <- arima.sim(list(ma = c(0.88)), n = 1000)
ts.plot(yt1)

par(mfrow = c(1,2))
acf(yt1)
pacf(yt1)

6.4.2 MA(1) negativa

yt2 <- arima.sim(list(ma = c(-0.8)), n = 1000)
ts.plot(yt2)

par(mfrow = c(1,2))
acf(yt2)
pacf(yt2)

6.4.3 MA(2)

yt3 <- arima.sim(list(ma = c(0.9, 0.8)), n = 1000)
ts.plot(yt3)

par(mfrow = c(1,2))
acf(yt3)
pacf(yt3)

6.5 Ejemplos adicionales con desviación estándar distinta

# AR(2) con sd = 1.5
xt2 <- arima.sim(list(order = c(2,0,0), ar = c(0.2, 0.55)), sd = 1.5, n = 1000)

# MA(3) con sd = 3
yt3 <- arima.sim(list(ma = c(0.9, -0.8, -0.8)), sd = 3, n = 1000)
par(mfrow = c(1,2))
acf(yt3)
pacf(yt3)