Google
 

Trailing-Edge - PDP-10 Archives - decus_20tap2_198111 - decus/20-0026/smo.doc
There are 2 other files named smo.doc in the archive. Click here to see a list.
SUBROUTINE SMO

PURPOSE
   TO SMOOTH OR FILTER SERIES A BY WEIGHTS W.

USAGE
   CALL SMO (A,N,W,M,L,R)

DESCRIPTION OF PARAMETERS
   A - INPUT VECTOR OF LENGTH N CONTAINING TIME SERIES DATA.
   N - LENGTH OF SERIES A.
   W - INPUT VECTOR OF LENGTH M CONTAINING WEIGHTS.
   M - NUMBER OF ITEMS IN WEIGHT VECTOR.  M MUST BE AN ODD
       INTEGER.  (IF M IS AN EVEN INTEGER, ANY FRACTION
       RESULTING FROM THE CALCULATION OF (L*(M-1))/2 IN (1)
       AND (2) BELOW WILL BE TRUNCATED.)
   L - SELECTION INTEGER.  FOR EXAMPLE, L=12 MEANS THAT WEIGHTS
       ARE APPLIED TO EVERY 12-TH ITEM OF A.  L=1 APPLIES
       WEIGHTS TO SUCCESSIVE ITEMS OF A.  FOR MONTHLY DATA,
       L=12 GIVES YEAR-TO-YEAR AVERAGES AND L=1 GIVES MONTH-TO-
       MONTH AVERAGES.
   R - OUTPUT VECTOR OF LENGTH N.  FROM IL TO IH ELEMENTS OF
       THE VECTOR R ARE FILLED WITH THE SMOOTHED SERIES AND
       OTHER ELEMENTS WITH ZERO, WHERE
	    IL=(L*(M-1))/2+1  ................ (1)
	    IH=N-(L*(M-1))/2  ................ (2)

REMARKS
   N MUST BE GREATER THAN OR EQUAL TO THE PRODUCT OF L*M.

SUBROUTINES AND FUNCTION SUBPROGRAMS REQUIRED
   NONE

METHOD
   REFER TO THE ARTICLE 'FORTRAN SUBROUTINES FOR TIME SERIES
   ANALYSIS', BY J. R. HEALY AND B. P. BOGERT, COMMUNICATIONS
   OF ACM, V.6, NO.1, JANUARY, 1963.