When I run the following sim:
set.seed(999)
inter.vec <- vector()
mean.vec <- vector()
for (i in 1:999){
yt <- arima.sim(n=9999, list(order=c(0,0,0)), mean = 0.6)
mean.vec[i] <- mean(yt)
fit <- Arima(yt, order = c(0,0,0), include.mean = T)
inter.vec[i] <- coef(fit)[1]
}
lattice::densityplot(mean.vec)
lattice::densityplot(inter.vec)
I get exactly what I expect under the specification $Y_t = \mu + e_t$. The means of the generated series are centred on 0.6 and the estimate for the intercept from the Arima model is centred on 0.6.
Then I run the following sim, an MA(1) model with non-zero mean, initially under the impression I am generating data from the specification $Y_t = 0.6 -0.3 e_{t-1} + e_t$:
set.seed(616)
ma.vec <- vector()
inter.vec <- vector()
mean.vec <- vector()
for (i in 1:999){
yt <- arima.sim(n=9999, list(order=c(0,0,1), ma=-.3), mean = 0.6)
mean.vec[i] <- mean(yt)
fit <- Arima(yt, order = c(0,0,1), include.mean = T)
ma.vec[i] <- coef(fit)[1]
inter.vec[i] <- coef(fit)[2]
}
But the model that I thought I was generating data from is not recovered as can be seen from the following plots. Clearly, the MA parameter is recovered well, but the intercept/mean is not. So what model is the sim generating data from?