Learn R Programming

TSQCA (version 1.3.1)

prepare_dat_bin: 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
)

Value

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

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.