acfarma(phi,theta [,lag:L][,nfreq:Nfreq][,arsign:Arsign,\ masign:Masign]), REAL vectors phi, theta, positive integer L, integer Nfreq != 0, Arsign and Masign either +1 or -1 |

Macro acfarma() computes the theoretical autocovariance function (ACVF) of an ARMA time series with given coefficients and innovation variance 1. gamma <- acfarma(phi, theta, lag:L), where phi and theta are REAL vectors and L > 0 is an integer, returns the ACVF from 0 to L lags of an ARMA time series with REAL coefficient vectors phi and theta. gamma[1] is the variance and gamma[h+1] is the lag h autocovariance, h = 1, ..., L. The innovation variance is assumed to be 1. To omit part of model, use phi = 0 or theta = 0. 'lag:L' can be omitted, in which case the default value is L = 100. You can make an "impulse" plot of the first 50 lags of the ACFV by Cmd> tsplot(acfarma(phi, theta, lag:50),0,impulse:T,lines:F) If you omit 'lines:F', lines are drawn between successive values. The model assumed for series X is (1 + Arsign*sum(phi*B^run(p)))X[t] = (1 + Masign*sum(theta*B^run(q)))Z[t]. where Arsign and Masign are either +1 or -1 and {Z[t]} is zero mean white noise with standard deviation 1. The default value for Arsign is variable ARSIGN if it exists and -1 otherwise. The default value for Masign is variable MASIGN if it exists and -1 otherwise. Or you can include either or both keyword phrases 'arsign:Arsign' and 'masign:Masign' as arguments. See topic 'MASIGN' for an explanation. If you want the convention used by Brockwell and Davis, you should do the following before you start your analysis Cmd> MASIGN <- 1; ARSIGN <- -1 It is an error for ARSIGN, MASIGN or supplied values of Arsign and Masign to be other than +1 or -1. acfarma() uses the fast discrete Fourier transform to compute the ACVF. The number of frequencies used is the smallest integer Nfreq >= max(500,L+1) with no prime factors > 29. Or you can specify Nfreq by including nfreq:Nfreq as an argument, where Nfreq is non-zero integer. When Nfreq < 0, abs(Nfreq) is used without further checking; when Nfreq > 0 it is an error when Nfreq has a prime factor > 29. See also specarma(), tsplot().

Gary Oehlert 2003-01-15