Pairwise Cramer's V of OTIS b01 alert columns (mortification proxy)
Source:R/mrm_otis.R
mrm_otis_mortification_cooccurrence.RdComputes the pairwise Cramer's V (and chi-square test) for every pair of the three OTIS b01 alert columns. The MentalHealth x SuicideRisk Cramer's V is the substantive "mortification co-occurrence" figure used in the MRM paper.
Usage
mrm_otis_mortification_cooccurrence(
data,
alert_cols = c("MentalHealth_Alert", "SuicideRisk_Alert", "SuicideWatch_Alert")
)Value
A data.frame with one row per pair, columns alert_a,
alert_b, n, chi2, df, p_value, morie_cramers_v.
Details
Values are computed by treating "Yes" as 1 and any other value as
0; rows with NA in either alert column are dropped from that pair.
Examples
if (FALSE) {
b01 <- read.csv("b01_segregation_detailed_dataset.csv")
mrm_otis_mortification_cooccurrence(b01)
}