February 28, 2017

White Noise

n <- 1000; time <- 1:n
eps <- rt(n, df=3) # t with 3 degrees of freedom (heavy-tailed)
plot(time, eps, type="l", col=2)

AR(1), a = 0.5

x <- filter(eps, 0.5, method="recursive")
plot(time, x, type="l", col=2)

AR(1), a = -0.5

x <- filter(eps, -0.5, method="recursive")
plot(time, x, type="l", col=2)

AR(1), a = 1

x <- filter(eps, 1, method="recursive")
plot(time, x, type="l", col=2)

AR(1), a = -1

x <- filter(eps, -1, method="recursive")
plot(time, x, type="l", col=2)

AR(1), a = 1.1

x <- filter(eps, 1.1, method="recursive")
plot(time, x, type="l", col=2)

AR(1), a = -1.1

x <- filter(eps, -1.1, method="recursive")
plot(time, x, type="l", col=2)

AR(2), a1 = 0.4, a2 = -0.2

x <- filter(eps, c(0.4, -0.2), method="recursive")
plot(time, x, type="l", col=2) # stationary?

AR(2), a1 = 0.5, a2 = 0.5

x <- filter(eps, c(0.5, 0.5), method="recursive")
plot(time, x, type="l", col=2) # stationary?