| armafit {timsac} | R Documentation | 
ARMA Model Fitting
Description
Fit an ARMA model with specified order by using DAVIDON's algorithm.
Usage
  armafit(y, model.order)
Arguments
y | 
 a univariate time series.  | 
model.order | 
 a numerical vector of the form c(ar, ma) which gives the order to be fitted successively.  | 
Details
The maximum likelihood estimates of the coefficients of a scalar ARMA model
y(t) - a(1)y(t-1) -...- a(p)y(t-p) = u(t) - b(1)u(t-1) -...- b(q)u(t-q)
of a time series y(t) are obtained by using DAVIDON's algorithm.
Pure autoregression is not allowed.
Value
arcoef | 
 maximum likelihood estimates of AR coefficients.  | 
macoef | 
 maximum likelihood estimates of MA coefficients.  | 
arstd | 
 standard deviation (AR).  | 
mastd | 
 standard deviation (MA).  | 
v | 
 innovation variance.  | 
aic | 
 AIC.  | 
grad | 
 final gradient.  | 
References
H.Akaike, E.Arahata and T.Ozaki (1975) Computer Science Monograph, No.5, Timsac74, A Time Series Analysis and Control Program Package (1). The Institute of Statistical Mathematics.
Examples
# "arima.sim" is a function in "stats".
# Note that the sign of MA coefficient is opposite from that in "timsac".
y <- arima.sim(list(order=c(2,0,1), ar=c(0.64,-0.8), ma=-0.5), n = 1000)
z <- armafit(y, model.order = c(2,1))
z$arcoef
z$macoef