From a series of length 100, we have computed r1 = 0.8, r2 = 0.5, r3 = 0.4, Y ̄ = 2, and a sample variance of 5. If we assume that an AR(2) model with a constant term is appropriate, how can we get (simple) estimates of φ1, φ2, θ0 and σhate2 ?
Simulate an MA(1) series with θ = 0.8 and n = 48.
set.seed(12345)
series = arima.sim(n = 48, list(ma = -0.8))
plot(series)
estimate.ma1.mom=function(x)
{
r=acf(x,plot=F)$acf[2]
if (abs(r)<0.5)
return((-1+sqrt(1-4*r^2))/(2*r)) else return(NA)
}
estimate.ma1.mom(series)
## [1] 0.7100616
arima(series,order=c(0,0,1),method='CSS')
##
## Call:
## arima(x = series, order = c(0, 0, 1), method = "CSS")
##
## Coefficients:
## ma1 intercept
## -0.8552 0.0407
## s.e. 0.0953 0.0253
##
## sigma^2 estimated as 1.188: part log likelihood = -72.25
arima(series,order=c(0,0,1),method='ML')
##
## Call:
## arima(x = series, order = c(0, 0, 1), method = "ML")
##
## Coefficients:
## ma1 intercept
## -1.0000 0.0552
## s.e. 0.0719 0.0104
##
## sigma^2 estimated as 1.063: log likelihood = -71.53, aic = 149.06
acf(series)
for (i in 1:500){
newma1 = arima.sim(n = 48, list(ma = -0.8))
}
#
mean(newma1)
## [1] 0.01284371
estimate.ma1.mom(newma1)
## [1] 0.6955597
arima(newma1,order=c(0,0,1),method='CSS')
##
## Call:
## arima(x = newma1, order = c(0, 0, 1), method = "CSS")
##
## Coefficients:
## ma1 intercept
## -0.7425 0.0113
## s.e. 0.1235 0.0442
##
## sigma^2 estimated as 1.272: part log likelihood = -73.89
arima(newma1,order=c(0,0,1),method='ML')
##
## Call:
## arima(x = newma1, order = c(0, 0, 1), method = "ML")
##
## Coefficients:
## ma1 intercept
## -0.7161 0.0086
## s.e. 0.1229 0.0490
##
## sigma^2 estimated as 1.272: log likelihood = -74.24, aic = 154.47
sd(newma1)^2
## [1] 1.899679
(1-(-0.8)^2)/48
## [1] 0.0075
arma11 = arima.sim(n=72,list(ar=0.7,ma=-0.4))
plot(arma11)
acf(arma11)$acf
## , , 1
##
## [,1]
## [1,] 1.000000000
## [2,] 0.496035630
## [3,] 0.463073959
## [4,] 0.290734384
## [5,] 0.243550600
## [6,] 0.164816557
## [7,] 0.127885306
## [8,] 0.154014332
## [9,] 0.174231440
## [10,] 0.211617589
## [11,] 0.106714906
## [12,] 0.095302818
## [13,] -0.003369514
## [14,] 0.018707781
## [15,] -0.114159660
## [16,] -0.008877741
## [17,] -0.017601514
## [18,] -0.045015734
## [19,] -0.017762854
arima(arma11,order=c(1,0,1),method='CSS')
##
## Call:
## arima(x = arma11, order = c(1, 0, 1), method = "CSS")
##
## Coefficients:
## ar1 ma1 intercept
## 0.7976 -0.4060 0.1365
## s.e. 0.1154 0.1675 0.3145
##
## sigma^2 estimated as 0.8066: part log likelihood = -94.42
The estimate is larger for least squares
arima(arma11,order=c(1,0,1),method='ML')
##
## Call:
## arima(x = arma11, order = c(1, 0, 1), method = "ML")
##
## Coefficients:
## ar1 ma1 intercept
## 0.8067 -0.4338 0.1865
## s.e. 0.1182 0.1825 0.2952
##
## sigma^2 estimated as 0.7921: log likelihood = -93.97, aic = 195.95
library(tseries)
## Registered S3 method overwritten by 'quantmod':
## method from
## as.zoo.data.frame zoo
library(ggplot2)
library(TSA)
##
## Attaching package: 'TSA'
## The following objects are masked from 'package:stats':
##
## acf, arima
## The following object is masked from 'package:utils':
##
## tar
eacf(arma11)
## AR/MA
## 0 1 2 3 4 5 6 7 8 9 10 11 12 13
## 0 x x x x o o o o o o o o o o
## 1 x o o o o o o o o o o o o o
## 2 o o o o o o o o o o o o o o
## 3 x o o o o o o o o o o o o o
## 4 o o o o o o o o o o o o o o
## 5 x o o o o o o o o o o o o o
## 6 o o x o o o o o o o o o o o
## 7 x o x o o o o o o o o o o o
data(robot)
arima(robot,order=c(1,0,0))
##
## Call:
## arima(x = robot, order = c(1, 0, 0))
##
## Coefficients:
## ar1 intercept
## 0.3074 0.0015
## s.e. 0.0528 0.0002
##
## sigma^2 estimated as 6.482e-06: log likelihood = 1475.54, aic = -2947.08
arima(robot,order=c(0,1,1))
##
## Call:
## arima(x = robot, order = c(0, 1, 1))
##
## Coefficients:
## ma1
## -0.8713
## s.e. 0.0389
##
## sigma^2 estimated as 6.069e-06: log likelihood = 1480.95, aic = -2959.9