prepare_dat_bin: Prepare analysis data frame for QCA::truthTable()

View source: R/tsqca_core.R

prepare_dat_binR Documentation

Prepare analysis data frame for QCA::truthTable()

Description

Constructs the data frame to be passed to QCA::truthTable(). For pre-calibrated variables, the original values are passed through without binarization. For all other variables, qca_bin() is applied.

Usage

prepare_dat_bin(
  dat,
  outcome_clean,
  conditions,
  thrY,
  thrX_vec,
  pre_calibrated = NULL
)

Arguments

dat

Original data frame.

outcome_clean

Character. Outcome variable name (without ~).

conditions

Character vector. Condition variable names.

thrY

Numeric. Threshold for outcome binarization.

thrX_vec

Named numeric vector. Thresholds for conditions.

pre_calibrated

Character vector or NULL. Names of pre-calibrated variables to pass through without binarization.

Value

Data frame with column Y (binarized outcome) and condition columns (binarized or passed through).


TSQCA documentation built on Feb. 18, 2026, 5:06 p.m.