Learn R Programming

FitARMA (version 1.6.1)

FitARMA: Fit ARMA/ARIMA using fast MLE algorithm

Description

Fits an ARIMA(p,d,q) model using the algorithm given in McLeod and Zhang (2007).

Usage

FitARMA(z, order = c(0, 0, 0), demean = TRUE, MeanMLEQ = FALSE, pApprox = 30, MaxLag = 30)

Arguments

z

time series

order

model order, c(p,d,q)

demean

if TRUE, mean parameter included otherwise assumed zero

MeanMLEQ

exact MLE for mean, ignored unless demean=TRUE

pApprox

order of approximation to be used

MaxLag

maximum number of lags for portmanteau test

Value

A list with class name "FitARMA" and components:

loglikelihood

value of the loglikelihood

phiHat

AR coefficients

thetaHat

MA coefficients

sigsqHat

innovation variance estimate

muHat

estimate of the mean

covHat

covariance matrix of the coefficient estimates

racf

residual autocorrelations

LjungBox

table of Ljung-Box portmanteau test statistics

res

innovation residuals, same length as z

fits

fitted values, same length as z

demean

TRUE if mean estimated otherwise assumed zero

IterationCount

number of iterations in mean mle estimation

convergence

value returned by optim -- should be 0

MLEMeanQ

TRUE if mle for mean algorithm used

tsp

tsp(z)

call

result from match.call() showing how the function was called

ModelTitle

description of model

DataTitle

returns attr(z,"title")

Details

See McLeod and Ying (2007).

References

A.I. McLeod andY. Zhang (2008), Faster ARMA maximum likelihood estimation, Computational Statistics & Data Analysis, 52-4, 2166-2176. DOI link: http://dx.doi.org/10.1016/j.csda.2007.07.020

See Also

GetFitARMA, print.FitARMA, coef.FitARMA, residuals.FitARMA, fitted.FitARMA, arima

Examples

Run this code
# NOT RUN {
data(SeriesA) #in datasets()
out1<-FitARMA(SeriesA, c(1,0,1))
out1
coef(out1)
out2<-FitARMA(SeriesA, c(0,1,1))
out2
coef(out2)
# }

Run the code above in your browser using DataLab