Converts a coin object to a links data frame with coincidences and expected values.

expectedList(data, names = NULL, min = 1, confidence=FALSE)

Arguments

data

is a coin object. See coin

names

a character vector.

min

minimum value of the statistic to include the edge in the list.

confidence

add the confidence interval if TRUE.

Value

A links data frame with coincidences and expected values.

Author

Modesto Escobar, Department of Sociology and Communication, University of Salamanca. See https://sociocav.usal.es/blog/modesto-escobar/

Examples

# A character column (with separator) frame <- data.frame(A = c("Man; Women", "Women; Women", "Man; Man", "Undet.; Women; Man")) data <- dichotomize(frame, "A", sep = "; ")[2:4] C <- coin(data) # coincidence matrix expectedList(C) # edge data frame
#> Source Target coincidences expected #> 1 Man Women 2 2.25 #> 2 Man Undet. 1 0.75 #> 3 Women Undet. 1 0.75