g13asf
g13asf
© Numerical Algorithms Group, 2002.
Purpose
G13ASF Univariate time series, diagnostic checking of residuals,
following G13AEF or G13AFF
Synopsis
[r,rcm,chi,idf,siglev,ifail] = g13asf(v,mr,m,par<,ishow,ifail>)
Description
Consider the univariate multiplicative autoregressive-moving
average model
s s
(phi)(B)(Phi)(B )(W -(mu))=(theta)(B)(Theta)(B )(epsilon) (1)
t t
where W , for t=1,2,...,n denotes a time series and (epsilon) ,
t t
for t=1,2,...,n is a residual series assumed to be normally
2
distributed with zero mean and variance (sigma) (>0). The
(epsilon) 's are also assumed to be uncorrelated. Here (mu) is
t
the overall mean term, s is the seasonal period and B is the
r
backward shift operator such that B W =W . The polynomials in
t t-r
(1) are defined as follows:
2 p
(phi)(B)=1-(phi) B-(phi) B -...-(phi) B
1 2 p
is the non-seasonal autoregressive (AR) operator;
2 q
(theta)(B)=1-(theta) B-(theta) B -...-(theta) B
1 2 q
is the non-seasonal moving average (MA) operator;
s s 2s Ps
(Phi)(B )=1-(Phi) B -(Phi) B -...-(Phi) B
1 2 P
is the seasonal AR operator; and
s s 2s Qs
(Theta)(B )=1-(Theta) B -(Theta) B -...-(Theta) B
1 2 Q
is the seasonal MA operator. The model (1) is assumed to be
s
stationary, that is the zeros of (phi)(B) and (Phi)(B ) are
assumed to lie outside the unit circle. The model (1) is also
assumed to be invertible, that is the zeros of (theta)(B) and
s
(Theta)(B ) are assumed to lie outside the unit circle. When both
s s
(Phi)(B ) and (Theta)(B ) are absent from the model, that is when
P=Q=0, then the model is said to be non-seasonal.
^
The estimated residual autocorrelation coefficient at lag l, r ,
l
is computed as:
n
-- ^^^^^^^^^ _________ ^^^^^^^^^ _________
> ((epsilon) -(epsilon))((epsilon) -(epsilon))
-- t-l t
^ t=l+1
r = ---------------------------------------------------- ,
l n
-- ^^^^^^^^^ _________ 2
> ((epsilon) -(epsilon))
-- t
t=1
l=1,2,...
^^^^^^^^^
where (epsilon) denotes an estimate of the tth residual,
t
n
_________ -- ^^^^^^^^^
(epsilon) , and (epsilon)= > (epsilon) /n. A portmanteau
t -- t
t=1
statistic, Q , is calculated from the formula:
m
-- ^2
Q =n(n+2) > r /(n-l)
(m) -- l
i=1
where m denotes the number of residual autocorrelations computed.
Under the hypothesis of model adequacy, Q has an asymptotic
(m)
2
(chi) distribution on m-p-q-P-Q degrees of freedom. Let
^T ^ ^ ^ ^
r =(r ,r ,...,r ) then the variance-covariance matrix of r is
1 2 m
given by:
^ T -1 T
Var(r)=[I -X(X X) X ]/n.
m
2
(Note that the mean, (mu), and the residual variance, (sigma) ,
^
play no part in calculating Var(r) and therefore are not required
as input to G13ASF.)
Parameters
g13asf
Required Input Arguments:
v (:) real
mr (7) integer
m integer
par (:) real
Optional Input Arguments: <Default>
ishow integer 1
ifail integer -1
Output Arguments:
r (m) real
rcm (:,m) real
chi real
idf integer
siglev real
ifail integer