higham_gamma: Higham gamma correlation coefficient computation

Description Usage Arguments Examples

View source: R/higham_gamma.R

Description

Computes the approximated gamma correlation coefficient described by Higham and Higham (2018), based on the A_g statistic.

Usage

1
higham_gamma(data, varname, outcomevar, bins)

Arguments

data

a dataframe that holds the judgment and outcome variables.

varname

the name of the variable that is to be binned.

outcomevar

the name of the outcome variable that the hit and false alarm bin calculations are based on.

bins

a positive integer indicating the number of bins for the calculations.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
# Randomly select 100 integers from 0 - 100.
set.seed(2)
a <- sample(0:100,100,replace=TRUE)

# Randomly select 100 integers of 0 or 1.
set.seed(2)
b <- sample(0:1,100,replace=TRUE)

# Send to data frame.
c <- data.frame(a,b)

# Send to function; output Higham gamma statistic
higham_gamma(c, varname = "a", outcomevar = "b", bins = 5)

tmc2737/t2roc documentation built on May 29, 2019, 9:31 a.m.