NTIES
Computes tie statistics for a sample of observations.
Required Arguments
X — Vector of length NOBS containing the observations. (Input)
X must be ordered monotonically increasing with all missing values removed.
FUZZ — Value used to determine ties. (Input)
Observations i and j are tied if the successive differences X(k + 1)  X(k) between observations i and j, inclusive, are all less than FUZZ. FUZZ must be nonnegative.
TIES — Vector of length 4 containing the tie statistics. (Output)
The tie statistics are returned in TIES and are computed as follows:
where tj is the number of ties in the j‑th group (rank) of ties, and is the number of tie groups in the sample.
Optional Arguments
NOBS — The number of observations. (Input)
Default: NOBS = size (X,1).
FORTRAN 90 Interface
Generic: CALL NTIES (X, FUZZ, TIES [])
Specific: The specific interface names are S_NTIES and D_NTIES.
FORTRAN 77 Interface
Single: CALL NTIES (NOBS, X, FUZZ, TIES)
Double: The double precision name is DNTIES.
Description
Routine NTIES computes tie statistics for a monotonically increasing sample of observations. “Tie statistics” are statistics that may be used to correct a continuous distribution theory nonparametric test for tied observations in the data. Observations i and j are tied if the successive differences X(k + 1)  X(k), inclusive, are all less than FUZZ. Note that if each of the monotonically increasing observations is equal to its predecessor plus a constant, if that constant is less than FUZZ, then all observations are contained in one tie group. For example, if FUZZ = 0.11, then the following observations are all in one tie group.
0.0, 0.10, 0.20, 0.30, 0.40, 0.50, 0.60, 0.70, 0.80, 0.90, 1.00
Example
We want to compute tie statistics for a sample of length 7.
 
USE NTIES_INT
USE WRRRN_INT
 
IMPLICIT NONE
INTEGER NOBS
REAL FUZZ
PARAMETER (FUZZ=0.001, NOBS=7)
!
REAL TIES(4), X(NOBS)
!
DATA X/1.0, 1.0001, 1.0002, 2.0, 3.0, 3.0, 4.0/
! Compute tie statistics
CALL NTIES (X, FUZZ, TIES)
! Print results
CALL WRRRN ('TIES', TIES, 1, 4, 1, 0)
!
END
Output
 
TIES
1 2 3 4
4.00 2.50 84.00 6.00
Published date: 03/19/2020
Last modified date: 03/19/2020