AUTO_FPE_MUL_AR
Automatic selection and fitting of a multivariate autoregressive time series model using Akaike’s Multivariate Final Prediction Error (MFPE) criteria.
Required Arguments
XNOBS by NCHANX matrix containing the stationary time series. Each row corresponds to an observation in the time series, and each column corresponds to a univariate time series for one of the channels. (Input)
MAXLAG — Maximum number of autoregressive parameters requested. (Input)
NMATRIX — Number of autoregressive parameter matrices in minimum FPE model. (Output)
PARMAXLAG by NCHANX by NCHANX array containing estimates for the autoregressive parameters in the selected model. (Output)
Optional Arguments
IPRINT — Printing option. (Input)
0
No printing
1
Prints final results only
2
Prints intermediate and final results
Default: IPRINT = 0
NOBS — Number of observations in each time series. (Input)
Default = size(X,1).
NCHANX — Number of variables, channels, in the multivariate time series. (Input)
Default = size(X,2).
CCVNCHANX by NCHANX by MAXLAG+1 matrix containing the sample crosscovariances of the NCHANX time series variables. For the i‑th time series variable, the first element, CCV(i,i, 1) is the sample variance for the i‑th series and the remaining elements, CCV(i,i, 2) … CCV(i,i, MAXLAG+1), contain the autocovariances of the i‑th series for lags 1 thru MAXLAG. Elements CCV(i,j, 2), CCV(i,jMAXLAG+1,), contain the autocovariances between the i‑th and j‑th series for lags 1 thru MAXLAG (Output)
AVARNCHANX by NCHANX matrix containing estimates of the noise variance for each of the NCHANX time series. (Output)
FPE — Multivariate Final Prediction Error for fitted model. (Output)
FORTRAN 90 Interface
Generic: CALL AUTO_FPE_MUL_AR (X, MAXLAG, NMATRIX, PAR [])
Specific: The specific interface names are S_AUTO_FPE_MUL_AR and D_AUTO_FPE_MUL_AR.
Description
The AUTO_FPE_MUL_AR routine is based upon the FPEC program published in the TIMSAC –71 Library described by Akaike, H. and Nakagawa, T (1972). Estimates of the autoregressive parameters for the model with minimum FPE are calculated using the methodology described in Akaike, H., et. al (1979).
The multivariate Final Prediction Error for a multivariate autoregressive model with lag p is defined as:
where is the determinant of the estimated NCHANX by NCHANX matrix of covariances of the white noise in the NCHANX series, m = NCHANX and N = NOBS.
The model selected and parameter estimates vary depending upon the value of MAXLAG. Akaike and Nakagawa (1972) recommend that MAXLAG start with values between and , and that MAXLAG does not exceed .
In every case, however, MAXLAG must never exceed .
The numerical accuracy decreases as MAXLAG increases. In this case, it is possible for the estimated FPE to become negative. If this happens , using double percision may help.
Example
Consider the Wolfer Sunspot Data (Box and Jenkins 1976, page 530) along with data on northern light and earthquake activity (Robinson 1967, page 204) for each year from 1770 through 1869 to be a 3‑channel time series. The following program automatically fits this data to an AR model with a MAXLAG = 10. In this example, AUTO_FPE_MUL_AR selects a multivariate autoregressive model with 2 lags.
 
use auto_fpe_mul_ar_int
use wrrrl_int
use gdata_int
implicit none
! SPECIFICATIONS FOR PARAMETERS
 
integer,parameter :: nobs=100, nvar=3, maxlag=10, npar=2
integer :: nrow, ncol, nmatrix
real(kind(1e0)) :: ccv(maxlag+1,nvar,nvar)
real(kind(1e0)) :: x(nobs,nvar+1)
real(kind(1e0)) :: par(maxlag, nvar, nvar)
real(kind(1e0)) :: avar(nvar, nvar), aic, fpe
 
! SPECIFICATIONS FOR LOCAL VARIABLES
character :: label(1)*4
integer :: i
! EXAMPLE #1
label(1) = 'NONE'
! GET ROBINSON MULTICHANNEL DATA
call gdata( 8, x, nrow, ncol)
!
call auto_fpe_mul_ar(x(1:,2:), maxlag, nmatrix, par, aic=aic, &
fpe=fpe, avar=avar)
!
write(*,*) 'Order Selected: ', nmatrix
write(*,*) 'FPE = ', fpe
do i = 1, npar
call wrrrl('PAR ', par(i, 1:nvar, 1:nvar), label, &
label, fmt='(F15.10)')
enddo
write(*,*) ' '
call wrrrl('AVAR (White Noise)', avar, label, label, &
fmt='(F15.10)')
end
Output
Order Selected: 2
FPE = 825727500.0
PAR
1.2989480495 0.0272710621 0.0238259397
0.0364407972 0.7911528349 0.0851913393
-0.2183818072 -0.0601412356 -0.0717520714
PAR
-0.6405253410 0.0186619535 -0.0319643840
0.0082284175 -0.1621686369 0.0587148108
-0.1242173612 0.3418768048 -0.0425752103
AVAR (White Noise)
281.7733154297 231.8975372314 57.6690979004
231.8975982666 1296.4528808594 70.7170333862
57.6690635681 70.7170333862 1752.6368408203
Published date: 03/19/2020
Last modified date: 03/19/2020