Skip to contents

Computes pairwise phi coefficients (Φ) between binary categorical variables with explicit 0/1 coding (1 == PositiveLevel from createBinaryMapping()), then renders heatmap-style plots with raw and FDR-adjusted significance.

Usage

PlotPhiHeatmap(Data, CatVars, Relabel = TRUE, binary_map = NULL)

Arguments

Data

A dataframe.

CatVars

Character vector of binary categorical variable names.

Relabel

Logical; if TRUE, uses sjlabelled variable labels for axes.

binary_map

Optional mapping as returned by createBinaryMapping(). If NULL, a mapping is created internally for CatVars.

Value

A list with:

  • Unadjusted: list(PvalTable, plot)

  • FDRCorrected: list(PvalTable, plot)

  • method = "Phi"

  • Relabel

  • BinaryMapping (used)