Skip to contents

This function calculates point-biserial correlations between binary categorical variables and continuous variables, creates a summary table, and generates heatmap-style plots to visualize the correlations.

Usage

PlotPointCorrelationsHeatmap(
  Data,
  CatVars,
  ContVars,
  Covariates = NULL,
  Relabel = TRUE,
  Ordinal = TRUE
)

Arguments

Data

A dataframe containing the data.

CatVars

A vector of column names representing binary categorical variables.

ContVars

A vector of column names representing continuous variables.

Covariates

A vector of column names representing covariates (optional).

Relabel

A logical value indicating whether to relabel variables using variable labels (default: TRUE).

Ordinal

A logical value indicating whether to treat ordinal variables as numeric (default: TRUE).

Value

A list containing two elements:

  • Unadjusted: A list with the unadjusted p-value table and corresponding plot.

  • FDRCorrected: A list with the FDR-adjusted p-value table and corresponding plot.

  • method: The statistical method used ("R_pb").

  • Relabel: Logical indicating whether relabeling was applied.

  • Covariates: The covariates used.