Release date: 2026-02-18
pre_calibrated vignette
section. The example referenced variables not included in the bundled
sample_data. The section now provides a prose description of the feature;
a worked example will be added when a suitable public dataset is available.@param documentation for thrX, thrX_default, sweep_list,
and sweep_list_X: pre-calibrated variables do not require a threshold
entry (the previous documentation incorrectly stated otherwise).This is a documentation-only patch. No changes to code logic or behavior.
Release date: 2026-02-18
All four sweep functions (otSweep, dtSweep, ctSweepS, ctSweepM) now
support a pre_calibrated argument. Variables listed in pre_calibrated are
passed through to QCA::truthTable() without binarization, enabling mixed
crisp/fuzzy analyses where some conditions are pre-calibrated via
QCA::calibrate() while others are binarized by threshold sweep.
Usage:
# AGE is pre-calibrated as a fuzzy set; other conditions are binarized
result <- otSweep(
dat = dat,
outcome = "INT",
conditions = c("CHT", "PRC", "UNQ", "AGE", "GEN"),
sweep_range = 6:9,
thrX = c(CHT = 7, PRC = 7, UNQ = 7, AGE = 0.5, GEN = 1),
pre_calibrated = c("AGE"),
include = "?",
dir.exp = c(1, 1, 1, "-", "-"),
incl.cut = 0.80,
n.cut = 2,
pri.cut = 0.50
)
Validation: The function raises an error if a pre-calibrated variable is
not found in conditions, or if its values fall outside the [0, 1] range.
A warning is issued if a pre-calibrated variable is also listed as a sweep
target (in sweep_list_X / sweep_list), since threshold sweeping has no
effect on fixed fuzzy values.
Backward compatibility: When pre_calibrated = NULL (the default), all
functions produce exactly the same output as v1.2.0.
prepare_dat_bin() in tsqca_core.R centralizes
data preparation logic, replacing the inline binarization code that was
duplicated across all four sweep functions.validate_pre_calibrated() in tsqca_core.R performs
input validation for the pre_calibrated parameter.pre_calibrated is now stored in the params object returned by all sweep
functions (when return_details = TRUE).generate_report() now displays pre-calibrated conditions in the Analysis
Overview section.Release date: 2026-01-19
Problem: When dir.exp is specified for intermediate solutions, the QCA package stores:
- sol$solution — Contains the Parsimonious solution
- sol$i.sol$C1P1$solution — Contains the true Intermediate solution
Previous versions of TSQCA incorrectly prioritized sol$solution, causing Parsimonious solutions to be extracted and displayed when Intermediate solutions were expected.
Fix: All solution extraction functions now correctly prioritize sol$i.sol when available:
get_n_solutions() — Now checks i.sol firstqca_extract() — Now checks i.sol first extract_solution_list() — Now checks i.sol firstwrite_full_report() — Fixed 3 locationswrite_simple_report() — Fixed 1 locationImpact: Users who specified dir.exp for intermediate solutions may have received incorrect results in:
- Report generation (generate_report())
- Configuration charts
- Solution expression extraction
Verification: The print(sol) output was always correct because the QCA package's print method handles this correctly. Only programmatic extraction was affected.
Reports now explicitly display the solution type in the Analysis Overview section:
| Include | dir.exp | Solution Type |
|---------|---------|-------------------|
| "" | any | Complex (Conservative) |
| "?" | NULL | Parsimonious |
| "?" | specified | Intermediate |
Added optional raw QCA output section to reports for verification purposes:
generate_report(result, "report.md", include_raw_output = TRUE) # default
generate_report(result, "report.md", include_raw_output = FALSE) # disable
When enabled, each threshold's detailed results include:
#### QCA Package Output (for verification)
DEVURBLITSTB + DEVLIT~INDSTB -> SURV
This allows researchers to verify that TSQCA's extraction matches the QCA package's native output.
If you used intermediate solutions (with dir.exp) in previous versions, we recommend re-running analyses to ensure correct results. Compare your new results with print(minimize(...)) output for verification.
Release date: 2026-01-17
dir.exp = NULL BehaviorProblem: In v1.0.0, when dir.exp = NULL (the default), the package incorrectly converted it to c(1, 1, ...), which forced intermediate solution calculation regardless of user intent.
Fix: dir.exp = NULL is now correctly passed to QCA::minimize() without modification.
To ensure consistency with the QCA package, default argument values have been changed:
| Argument | v1.0.0 Default | v1.1.0 Default | Effect |
|----------|---------------|---------------|--------|
| include | "?" | "" | Complex solution (no logical remainders) |
| dir.exp | NULL → c(1,1,...) (bug) | NULL | No directional expectations |
Result: TSQCA now produces complex solutions by default, matching QCA::minimize() default behavior.
| Solution Type | How to Compute |
|--------------|----------------|
| Complex (default) | include = "", dir.exp = NULL |
| Parsimonious | include = "?", dir.exp = NULL |
| Intermediate | include = "?", dir.exp = c(1, 1, ...) |
# v1.0.0 (incorrect: intermediate solution by default due to bug)
result <- otSweep(dat, "Y", c("X1", "X2", "X3"), sweep_range = 7, thrX = thrX)
# v1.1.0: Complex solution (new default, QCA compatible)
result_comp <- otSweep(dat, "Y", c("X1", "X2", "X3"), sweep_range = 7, thrX = thrX)
# v1.1.0: Parsimonious solution (include = "?")
result_pars <- otSweep(dat, "Y", c("X1", "X2", "X3"), sweep_range = 7, thrX = thrX,
include = "?")
# v1.1.0: Intermediate solution (include = "?" + dir.exp)
result_int <- otSweep(dat, "Y", c("X1", "X2", "X3"), sweep_range = 7, thrX = thrX,
include = "?",
dir.exp = c(1, 1, 1))
All four sweep functions (otSweep, dtSweep, ctSweepS, ctSweepM) now include examples demonstrating:
include = "?"include = "?" with dir.expThe @param dir.exp and @param include documentation now clearly explains:
- Default behavior produces complex solutions (QCA compatible)
- include = "?" enables logical remainders for parsimonious/intermediate
- dir.exp specifies directional expectations for intermediate solutions
Release date: 2026-01-06
The default value for chart_level parameter has been changed from "summary" to "term".
Rationale:
The solution-term level format (Fiss, 2011 notation) is the standard for academic publications, where each column represents one prime implicant (configuration). The previous default ("summary") aggregated all configurations at each threshold into a single column, which obscured the distinction between different sufficient paths.
Column header format updated:
- Old format: thrY=6_M1
- New format: thrY = 6 (M1) (consistent with the paper format)
Affected functions:
- generate_report() — default chart_level is now "term"
- generate_cross_threshold_chart() — default chart_level is now "term"
Migration:
If you prefer the previous behavior (threshold-level summary), explicitly specify chart_level = "summary":
generate_report(result, "report.md", chart_level = "summary")
generate_cross_threshold_chart(result, conditions, chart_level = "summary")
Release date: 2026-01-03
Added support for solution-term level configuration charts following Fiss (2011) notation. This feature allows generating charts where each column represents a single prime implicant (configuration), which is the standard format for academic publications.
New parameter for generate_report():
chart_level — Character. Either "summary" (default) or "term"."summary": Threshold-level summaries where each column represents one threshold, showing all conditions that appear in any configuration at that threshold."term": Solution-term level (Fiss-style) where each column represents one prime implicant (sufficient configuration). Recommended for academic publications.New functions:
generate_cross_threshold_chart() — Generate configuration charts from sweep results with chart_level option.parse_solution_terms() — Internal function to parse solution expressions into individual terms.get_condition_status() — Internal function to determine condition presence/absence in a term.generate_term_level_chart() — Internal function for term-level chart generation.generate_threshold_level_chart() — Internal function for threshold-level chart generation.Example:
# Threshold-level summary (default)
generate_report(result, "report.md", chart_level = "summary")
# Solution-term level (Fiss-style, recommended for publications)
generate_report(result, "report.md", chart_level = "term")
When the solution is X3 + X1*X2, the term-level chart will show two separate columns (thrY=7_M1 for X3 and thrY=7_M2 for X1*X2), while the summary-level chart shows one column (thrY=7) with all three conditions marked.
Release date: 2026-01-03
Fixed non-working code examples in all vignettes (Tutorial and Reproducible, both EN/JA):
Yvar/Xvars to outcome/conditionsctSweepM() examples to use sweep_list parameter instead of old sweep_vars/sweep_rangedat parameter to all generate_report() exampleshead(res$summary) to summary(res) for consistency with S3 methodsoutcome, conditions)dat parameter to generate_report() examplestest_quick.R — Minimal verification script (6 tests)test_tutorial_code.R — Comprehensive verification script (11 tests)Release date: 2026-01-01
When multiple logically equivalent solutions (M1, M2, M3...) exist, configuration charts now automatically include a note explaining that M1 is displayed.
New parameters for generate_report():
solution_note — Logical. If TRUE (default), adds note when multiple solutions existsolution_note_style — "simple" (default) or "detailed" (includes EPIs)solution_note_lang — "en" (default) or "ja" for JapaneseNew parameters for config_chart_from_paths():
n_sol — Number of equivalent solutions (triggers note if > 1)solution_note — Logical. Whether to add solution notesolution_note_style — "simple" or "detailed"epi_list — Character vector of EPIs for detailed notesNew exported functions:
generate_solution_note() — Generate solution note textidentify_epi() — Identify Essential Prime Implicants from multiple solutionsExample output (simple):
*Note: 2 logically equivalent solutions were identified. This table presents configurations based on M1.*
Example output (detailed with EPIs):
*Note: 3 logically equivalent solutions were identified (M1-M3). This table presents configurations based on M1. All solutions share the essential prime implicants: A·B and C.*
Example (Japanese):
*注: 論理的に等価な2つの解が得られた。本表はM1に基づく構成を示す。*
Release date: 2025-12-31
Configuration charts are now automatically included in reports generated by generate_report().
New parameters for generate_report():
include_chart — Logical. If TRUE (default), includes Fiss-style configuration chartschart_symbol_set — Symbol set: "unicode" (default), "ascii", or "latex"Example:
# Generate report with configuration charts (default)
generate_report(result, "my_report.md", format = "full")
# Generate report without charts
generate_report(result, "my_report.md", include_chart = FALSE)
# Generate report with LaTeX symbols (for PDF/academic papers)
generate_report(result, "my_report.md", chart_symbol_set = "latex")
generate_config_chart() — Generate chart from QCA solution objectconfig_chart_from_paths() — Generate chart from path strings (e.g., "AB~C")config_chart_multi_solutions() — Generate separate charts for multiple solutionsFeatures:
"unicode" (● / ⊗), "ascii" (O / X), "latex" ($\bullet$ / $\otimes$)Fixed incorrect use of "Core Conditions" terminology:
| Old (incorrect) | New (correct) | Meaning |
|-----------------|---------------|---------|
| extract_mode = "core" | extract_mode = "essential" | Mode for extracting shared terms |
| core_terms | essential_terms | Terms in ALL solutions |
| peripheral_terms | selective_terms | Terms in SOME solutions |
Migration: Change extract_mode = "core" to extract_mode = "essential".
docs/TSQCA_Terminology_Guide_EN.md — English terminology guidedocs/TSQCA_Terminology_Guide_JA.md — Japanese terminology guideREADME_JP.md — Japanese READMEFixed incorrect use of "Core Conditions" terminology. The terms that appear in ALL equivalent solutions (M1, M2, M3...) are now correctly called Essential Prime Implicants (EPI), following standard Boolean minimization terminology.
Changed terms:
| Old (incorrect) | New (correct) | Meaning |
|-----------------|---------------|---------|
| extract_mode = "core" | extract_mode = "essential" | Mode for extracting shared terms |
| core_terms | essential_terms | Terms in ALL solutions |
| peripheral_terms | selective_terms | Terms in SOME solutions |
| "Core Conditions" | "Essential Prime Implicants (EPI)" | Report labels |
| "Peripheral Terms" | "Selective Prime Implicants (SPI)" | Report labels |
Why this matters:
The term "Core Conditions" in QCA literature (Fiss, 2011) refers to conditions appearing in both parsimonious AND intermediate solutions—a comparison between solution types. This is distinct from terms shared across multiple equivalent solutions of the same type, which are properly called "Essential Prime Implicants" in Boolean algebra terminology.
Migration:
If you used extract_mode = "core" in previous versions, change to extract_mode = "essential". The output structure is identical; only the names have changed for methodological accuracy.
Added functions for generating Fiss-style configuration charts (Table 5 format) commonly used in QCA publications.
New functions:
generate_config_chart() — Generate configuration chart from QCA solution objectconfig_chart_from_paths() — Generate chart from path strings (e.g., "AB~C")config_chart_multi_solutions() — Generate separate charts for multiple solutionsFeatures:
"unicode" (● / ⊗), "ascii" (O / X), "latex" ($\bullet$ / $\otimes$)Example:
# From QCA solution object
chart <- generate_config_chart(sol, symbol_set = "unicode")
cat(chart)
# From path strings
paths <- c("A*B*~C", "A*D")
chart <- config_chart_from_paths(paths)
cat(chart)
result$detailsgenerate_report() for dtSweep and ctSweepM resultsotSweep_result, dtSweep_result, ctSweepS_result, ctSweepM_result inherit from tsqca_resultprint() methods for all result typessummary() methods for all result types$summary, $details, and $params components still worksreturn_details = FALSE, returns plain data.frame without S3 classYvar to outcome and Xvars to conditions in all sweep functionsYvar, Xvars) are still supported with deprecation warningsoutcome = "~Y")truthTable() convention for negationotSweep(), dtSweep(), ctSweepS(), ctSweepM()generate_report() now displays "(negated)" indicator when analyzing negated outcomesYvar → outcome (recommended)Xvars → conditions (recommended)$params now includes:outcome: New argument name (also stores ~Y notation if negated)conditions: New argument namenegate_outcome: Boolean indicating if outcome was negated# Old syntax (still works, but shows deprecation warning)
result <- otSweep(dat, Yvar = "Y", Xvars = c("X1", "X2"), ...)
# New syntax (recommended)
result <- otSweep(dat, outcome = "Y", conditions = c("X1", "X2"), ...)
# Negated outcome (new feature)
result <- otSweep(dat, outcome = "~Y", conditions = c("X1", "X2"), ...)
extract_mode parameter to all sweep functions (otSweep(), dtSweep(), ctSweepS(), ctSweepM()) with three options:"first" (default): Returns only the first solution (M1), maintaining backward compatibility"all": Returns all intermediate solutions concatenated (e.g., "M1: AB; M2: AC")"essential": Returns essential prime implicants common to all solutions, plus peripheral and unique terms
Added get_n_solutions() helper function to count the number of intermediate solutions
generate_report() function for automatic markdown report generation with two formats:"full": Comprehensive report including all analysis details, solution formulas, and fit measures"simple": Condensed format designed for journal manuscript supplementary materials$params for full reproducibilityincl.cut, n.cut, pri.cut, dir.exp, include)return_details default from FALSE to TRUE for better integration with generate_report()n.cut default from 2 to 1 to align with QCA package conventionspri.cut default from 0.5 to 0 to align with QCA package conventionsreturn_details = TRUE, results are now accessed via $summary (e.g., result$summary$expression)n_solutions column when using extract_mode = "all" or "essential"selective_terms and unique_terms columns when using extract_mode = "essential"ctSweepS(): Single-condition X sweep (CTS-QCA)ctSweepM(): Multi-condition X sweep (MCTS-QCA)otSweep(): Outcome Y sweep (OTS-QCA)dtSweep(): Two-dimensional X and Y sweep (DTS-QCA)qca_bin(), qca_extract()Any scripts or data that you put into this service are public.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.