只是通过我的统计笔记做一些心理游戏......
我已经看到在滞后 1 和 2 处具有负值的 ACF - 我可能在这里头脑一片空白,但在滞后 1 处的高负 AC 并不意味着像 (-1,1,-1,1, ...),因此我们期望交流电也会在正负之间交替?
如果我在这里完全错了 - 是否有一个简单的例子,我们对滞后 1 和 2 都有很强的负 AC?
谢谢!
只是通过我的统计笔记做一些心理游戏......
我已经看到在滞后 1 和 2 处具有负值的 ACF - 我可能在这里头脑一片空白,但在滞后 1 处的高负 AC 并不意味着像 (-1,1,-1,1, ...),因此我们期望交流电也会在正负之间交替?
如果我在这里完全错了 - 是否有一个简单的例子,我们对滞后 1 和 2 都有很强的负 AC?
谢谢!
以下 DGP,一个 MA() 过程,在滞后 1 和 2 处具有负自相关:
下面是一些 R 代码来模拟 DGP 并亲自查看 ACF:
library(stats)
library(forecast) # for the Acf() function
# number of "observations"
n<-500
# initialization periods
j<-1000
# choose parameters
alpha<-10
theta<-c(-.5,-.25)
Q<-length(theta)
# generate iid disturbances
u<-rnorm(n+j,0,2)
# define the DGP and generate data series iteratively
y<-rep(alpha,n+j)
for(k in (Q+1):(n+j)){
y[k]<-alpha + sum(theta*u[k-c(1:Q)]) + u[k]
}
# get rid of the initialization periods
Y<-y[-c(1:j)]
# confirm the parameters
arima(Y,c(0,0,Q))
# Call:
# arima(x = Y, order = c(0, 0, Q))
#
# Coefficients:
# ma1 ma2 intercept
# -0.4763 -0.2546 9.9979
# s.e. 0.0448 0.0485 0.0246
#
# sigma^2 estimated as 4.124: log likelihood = -1064.03, aic = 2134.05
# look at the ACF/PACF
par(mfrow=c(2,1))
Acf(Y)
pacf(Y)