# NOT RUN {
# The example is from Salkind, Rasmussen (2007) Encyclopedia of measurement
# and statistics, pages 94-97
score <- c(rep(0, 16), rep(1, 22))
total_score <- c(87, 90, 94, 94, 97, 103, 103, 104, 106, 108, 109, 109, 109,
112, 119, 132, 100, 103, 103, 106, 112, 113, 114, 114, 118,
119, 120, 120, 124, 133, 135, 135, 136, 141, 155, 157, 159,
162)
# Calculate biserial correlation
biserial(score, total_score)
# Calculate point-biserial correlation
biserial(score, total_score, type = "point-biserial")
# Calculate modified biserial correlation (based on Brogden (1949))
biserial(score, total_score, type = "brogden")
# Calculate modified biserial correlation (Clemans-Lord)
biserial(score, total_score, type = "clemans-lord")
# }
Run the code above in your browser using DataLab