REAL*8 FUNCTION ARSDI1(ALAM1,ALAM2) C*********************************************************************** C In the calling routine a call to INIT must be made prior to calling * C this routine for the first time. * C*********************************************************************** C This function integrates the product of the spectral density function C of a univariate autogregressive process, and the function C cos(lambda*tau), between the frequencies lambda1 and lambda2, and C -lambda2 and -lambda1. C If lambda1=0 and lambda2=pi, this provides the autocovariance at lag C tau. C If tau=0, this provides the power of the spectrum over the indicated C frequencies. C Inputs: C ALAM1 Lambda1 C ALAM2 Lambda2 C Inputs (/AUAR/): C B Coefficients of autoregression C H Precision of shock to autoregression C TAU tau C NP Number of coefficients in autoregression C Output: C ARSDI1 Integrated value of product described above IMPLICIT REAL*8 (A-H,O-Z) EXTERNAL FARSD1 PARAMETER(LP=100) COMMON/AUAR/B(0:LP),H,TAU,NP COMMON/CONST/DLOG2,DLGPI,HLG2PI,PI,PII CALL DQDAG(FARSD1,ALAM1,ALAM2,1.0D-4,1.0D-4,2,AA,ERR) ARSDI1=PII*AA RETURN END