SomersD: Somers' D and its asymptotic standard errors

Description Usage Arguments Value References Examples

View source: R/SomersD.R

Description

Computes Somers' D on a given cartesian product Y x f(X), where Y consists of the components of y and f(X) consists of the components of fx. Furthermore, the asymptotic standard error as well as the modified asymptotic standard error to test the null hypothesis that the measure is zero are provided as defined in Goktas and Oznur (2011).

Usage

1
SomersD(y, fx)

Arguments

y

a vector of realized categories.

fx

a vector of predicted values of the ranking function f.

Value

A list of length three is returned, containing the following components:

val

Somers' D

ASE

the asymptotic standard error of Somers' D

ASE0

the modified asymptotic error of Somers' D under the null hypothesis.

References

Goktas, A., Oznur, I., 2011. A Comparison of the Most Commonly Used Measures of Association for Doubly Ordered Square Contingency Tables via Simulation. Metodoloski zvezki 8 (1), 17-37

Examples

1
SomersD(rep(1:5,each=3),c(3,3,3,rep(2:5,each=3)))

Example output

$val
[1] 0.7

$ASE0
[1] 0.1505545

$ASE
[1] 0.3146721

VUROCS documentation built on April 14, 2020, 6:47 p.m.