Next: Design Macros Help File Up: Arima Macros Help File Previous: rhatcovar()   Contents

# specarma()

Usage:
 ```specarma(phi ,theta [, nfreq:nf]), REAL vectors phi and theta, integer nf > 0 ```

Keywords: frequency domain, time series, spectrum analysis
```specarma(phi, theta [, nfreq:Nfreq]) computes the spectrum of an ARMA
time series with AR coefficients in phi and MA coefficients in theta and
innovation variance 1.

phi and theta are REAL vectors with no MISSING values. To omit part of
the model, use phi = 0 or theta = 0

Nfreq must be a positive integer with no prime factors > 29.

The result is a vector of length nf containing the spectrum at
frequencies 0, 1/Nfreq, 2/Nfreq, ..., (Nfreq-1)/Nfreq cycles per unit
time.

Without nfreq:Nfreq, when no positive integer scalar S exists, the
default is Nfreq = 400.  When S does exist and is a positive integer
scalar, the default for Nfreq is S.  It is an error if S has a prime
factor > 29.

You can use keyword phrases arsign:Arsign and masign:Masign, where
Arsign and Masign are +1 or -1, to modify the interpretation of the
coefficients in the ARMA model.  The default for Arsign is variable
ARSIGN if it exists or -1 if not.  The default for Masign is variable
MASIGN if it exists or -1 if not.

The ARMA model assumed is defined as
(1+Arsign*sum(phi*B^run(p)))X[t] = (1+Masign*sum(theta*B^run(q)))Z[t].
where B is the backshift operator and {Z[t]} is white noise with mean 0
and variance 1.

Arsign = -1 and Masign = -1 correspond to the convention used by Box
and Jenkins, and Arsign = -1 and Masign = +1 correspond to the
convention used by Brockwell and Davis

You can plot the spectrum for the ARMA model fit by arima() by
Cmd> result <- arima(y,pdq:vector(p,0,q), keep:T)

Cmd> ffplot(specarma(result\$phi, result\$theta))