Time series autocorrelation function

How to plot the autocorrelation function for a stationary time series (Yt) for which V (Yt) = 1, Cov(Yt, Yt+h) = .7
for h = 1 and zero for h = 2, 3, ... ?

Thanks in advance to you all.

Hello,

Welcome to the community!!

This might be what you are looking for:

# This has a long memory
ts.sim <- arima.sim(list(order = c(1,1,0), ar = 0.7), n = 200)
plot(ts.sim)
plot(diff(ts.sim))
acf(ts.sim)

# This has shorter memory
ts.sim <- arima.sim(n = 200, list(ar = c(0.7)),sd = sqrt(1))
plot(ts.sim)
plot(diff(ts.sim))
acf(ts.sim)
pacf(ts.sim)

But you will have to play with it to get exactly what you want.

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.