GetFitARMA {FitARMA}R Documentation

Fit ARMA(p,q) model to mean zero time series.

Description

The algorithm of McLeod and Zhang (2007) is used.

Usage

GetFitARMA(y, p, q, pApprox = 30, init = 0)

Arguments

y time series
p AR order
q MA order
pApprox initial AR approximation
init initial parameter estimates

Details

See McLeod and Zhang (2006). For AR(1), exact solution obtained via solving a cubic equation. For MA(1), optimize is used instead of optim. For valid likelihood computation, we need 2*pApprox >= length(y). So if the supplied value of pApprox does not satify this pApprox is set to length(n)/2. If pApprox is less than 30, a warning message is displayed.

Value

loglikelihood value of maximized loglikelihood
phiHat estimated phi parameters
thetaHat estimated theta parameters
convergence result from optim if used. Otherwise 0.
algorithm "L-BFGS-B" or "Nelder-Mead" or "optimize" or "cubic"

Author(s)

A.I. McLeod, aimcleod@uwo.ca

References

McLeod, A.I. and Zhang, Y. (2007, tentatively accepted). Faster ARMA Maximum Likelihood Estimation. Computational Statistics and Data Analysis.

See Also

arima, FitARMA

Examples

data(SeriesA)
z<-SeriesA-mean(SeriesA)
GetFitARMA(z, 1, 1)
w<-diff.ts(z, differences=1)
GetFitARMA(w, 0, 1)
  

[Package FitARMA version 1.0 Index]