
Spearman correlation between the clinical variables themselves
Source:R/clinical.R
fig_clinical_correlogram.RdWHY THIS IS NOT AN AFTERTHOUGHT. stats_clinical_association() adjusts
p-values within each variable, on the grounds that each variable is its own
question. That is only true when the variables carry different information. A
cohort where the sickest patients are also the ones who died has one gradient
and two columns describing it, and an association found against both is one
finding reported twice. This figure is where that is visible.
Usage
fig_clinical_correlogram(clin, outfile, dpi = 200, colors = fcs_colors())Details
WHAT IS INCLUDED. Numeric variables, and two-level variables coded 0/1 – for which Spearman is the point-biserial correlation of the ranks, a legitimate quantity. It is not the rank-biserial correlation: it is that times sqrt(3pq n^2 / (n^2 - 1)), so two perfectly separated groups of five give 0.87 rather than 1, and its magnitude is not comparable with a Cliff's delta. Variables with three or more unordered levels are excluded and named in the caption: there is no ordering to correlate, and coding them 1/2/3 would invent one.