C Library Functions  - autoco (3)

NAME

autoco(3f) - [M_datapac:STATISTICS] compute the sample autocorrelation coefficient

CONTENTS

Synopsis
Description
Input Arguments
Output Arguments
Examples
References
Author
Maintainer
License

SYNOPSIS

SUBROUTINE AUTOCO(X,N,Iwrite,Xautoc)

     Real(kind=wp), Intent (InOut) ::  X(:)
     Integer,       Intent (In)    ::  Iwrite
     Real(kind=wp), Intent (In)    ::  Xautoc

DESCRIPTION

AUTOCO(3f) computes the sample autocorrelation coefficient of the data in the input vector X. The sample autocorrelation coefficient equals the correlation between X(I) and X(I+1) over the entire sample. The autocorrelation coefficient coefficient will be a REAL value between -1.0 and 1.0 (inclusively).

INPUT ARGUMENTS

X The REAL vector of (unsorted) observations.
N The integer number of observations in the vector x.
IWRITE An integer flag code which (if set to 0) will suppress the printing of the sample autocorrelation coefficient as it is computed; or (if set to some integer value not equal to 0), like, say, 1) will cause the printing of the sample autocorrelation coefficient at the time it is computed.

OUTPUT ARGUMENTS

XAUTOC The REAL value of the computed sample autocorrelation coefficient. This REAL value will be between -1.0 and 1.0 (inclusively).

EXAMPLES

Sample program:

   program demo_autoco
   use M_datapac, only : autoco, label
   implicit none
   real ::  x(100)
   call label(’autoco’)
   !call   call autoco(x,size(x),1,xautoc)
   end program demo_autoco

Results:

REFERENCES

Jenkins and Watts, Spectral Analysis and its Applications, 1968, pages 5, 182.

AUTHOR

The original DATAPAC library was written by James J. Filliben of the Statistical Engineering Division, National Institute of Standards and Technology.

MAINTAINER

John Urban, 2022.05.31

LICENSE

CC0-1.0


Nemo Release 3.1 autoco (3) July 22, 2023
Generated by manServer 1.08 from 8d3ba640-3a10-42ac-a81b-c56bf209bf88 using man macros.