runs(3f) - [M_datapac:ANALYSIS] perform a runs test
Synopsis
Description
Input Arguments
Output
Examples
Author
Maintainer
License
References
SUBROUTINE RUNS(X,N)
REAL(kind=wp),intent(in) :: X(:) INTEGER,intent(in) :: N
RUNS(3f) performs a runs analysis of the data in the input vector x.
This runs analysis is a useful distribution-free test of the randomness of a data set.
The analysis consists of first determining the observed number of runs from the data, and then computing the expected number of runs, the standard deviation of the number of runs, and the resulting standardized statistic for the number of runs for runs of various lengths.
This is done for runs up, runs down, and runs up and down.
X The precision vector of (unsorted or sorted) observations. N The integer number of observations in the vector x. restrictions-- The maximum allowable value of n for this subroutine is 15000.
4 pages of automatic printout consisting of the observed number, expected number, standard deviation and resulting standardized statistic for runs of various lengths, and the cumulative frequency.
Sample program:
program demo_runs use M_datapac, only : runs implicit none ! call runs(x,y) end program demo_runsResults:
The original DATAPAC library was written by James Filliben of the Statistical Engineering Division, National Institute of Standards and Technology.
John Urban, 2022.05.31
CC0-1.0
o Levene and Wolfowitz, Annals of Mathematical Statistics, 1944, pages 58-69; especially pages 60, 63, and 64. o Bradley, Distribution-free Statistical Tests, 1968, Chapter 12, pages 271-282.
Nemo Release 3.1 | runs (3) | February 23, 2025 |