gamma_coef: Gamma coefficient of two ordinal variables

Description Usage Arguments Value Author(s) References Examples

View source: R/Gamma.R

Description

Calculates the Gamma coefficient as a measure of association between two ordinal variables.

Usage

1

Arguments

x

is a matrix of counts.

Value

Gamma coefficient, standard error and p value.

Author(s)

Marianne Mueller; original version Greg Rodd

References

Agresti, A. Categorical Data Analsysis. John Wiley & Sons, 2013, pp. 57-59.

Examples

1
2
3
4
5
6
7
# Association between raw score and sex of patients
score <- apply(amts[, 4:13], 1, sum, na.rm = TRUE)
gamma_coef(table(score,amts$sex))

# Association between raw score and indication group of patients
score <- apply(desc2[, 5:14], 1, sum, na.rm = TRUE)
gamma_coef(table(score,desc2$group))

muellermarianne/iarm documentation built on June 7, 2018, 1:13 p.m.