leiks_D: Calculate Leik's D of ordered data

Description Usage Arguments Details Value

View source: R/leiks_D.R

Description

Calculate Leiks' D of ordered data

Usage

1

Arguments

x

ordered; ordered data or data that can be coerced into ordered via as.factor and factor with ordered=T.

Details

Calculates the dispersion via the Leik's D statistic for ordinal data using the following formula;

D = 2 ∑ (F_{k} if F_{k} < 0.5 or 1 - F_{k} if F_{k} > 0.5) / (n - 1)

where n is the number of categories, and F_{k} is the cumulative distribution for category indexed by k, except in the case of one category, where the value 0 is returned.

Value

numeric; scalar value of Leik's D


stephematician/miForang documentation built on July 23, 2019, 5:11 p.m.