File: getsma.f

package info (click to toggle)
x13as 1.1-b59-1
  • links: PTS, VCS
  • area: non-free
  • in suites: bookworm
  • size: 9,088 kB
  • sloc: fortran: 114,121; makefile: 14
file content (41 lines) | stat: -rw-r--r-- 1,477 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
      DOUBLE PRECISION FUNCTION getsma()
      IMPLICIT NONE
c     ------------------------------------------------------------------
c     Function that returns value of first order seasonal moving
c     term in ARIMA model - will return 0.0 if not found.
c     ------------------------------------------------------------------
      INCLUDE 'srslen.prm'
      INCLUDE 'model.prm'
      INCLUDE 'model.cmn'
      INCLUDE 'mdldat.cmn'
      INCLUDE 'error.cmn'
c     ------------------------------------------------------------------
      DOUBLE PRECISION ZERO
      PARAMETER(ZERO=0d0)
c     ------------------------------------------------------------------
      CHARACTER tmpttl*(PGRPCR)
      INTEGER begopr,endopr,iopr,beglag,endlag,ilag,ntmpcr
c     ------------------------------------------------------------------
      getsma=ZERO
      begopr=Mdl(MA-1)
      endopr=Mdl(MA)-1
      IF(begopr.le.endopr)THEN
       DO iopr=begopr,endopr
        CALL getstr(Oprttl,Oprptr,Noprtl,iopr,tmpttl,ntmpcr)
        IF(Lfatal)RETURN
        IF(tmpttl(1:ntmpcr).eq.'Seasonal MA')THEN
         beglag=Opr(iopr-1)
         endlag=Opr(iopr)-1
         DO ilag=beglag,endlag
          IF(Arimal(ilag).eq.Sp)THEN
           getsma=Arimap(beglag)
           RETURN
          END IF
         END DO
        END IF
       END DO
      END IF
c     ------------------------------------------------------------------
      RETURN
      END