Creates a markdown report from QCA analysis results. Supports two formats: "full" (comprehensive) and "simple" (for manuscripts).
generate_report(
result,
output_file = "qca_report.md",
format = c("full", "simple"),
title = "QCA Analysis Report",
dat = NULL,
desc_vars = NULL,
include_chart = TRUE,
chart_symbol_set = c("unicode", "ascii", "latex"),
chart_level = c("term", "summary"),
solution_note = TRUE,
solution_note_style = c("simple", "detailed"),
solution_note_lang = c("en", "ja"),
include_fiss_core = FALSE,
include_raw_output = TRUE
)A result object from any Sweep function with
return_details = TRUE.
Character. Path to output markdown file.
Character. Report format: "full" or "simple".
Character. Report title.
Optional data frame. Original data for descriptive statistics.
Optional character vector. Variables for descriptive statistics. If NULL and dat is provided, uses Yvar and Xvars from params.
Logical. If TRUE (default), includes configuration charts (Fiss-style tables) in the report for each threshold.
Character. Symbol set for configuration charts:
"unicode" (default), "ascii", or "latex".
Character. Chart aggregation level:
"term" (default) produces solution-term level charts following Fiss (2011)
notation, where each column represents one prime implicant (sufficient
configuration). This format is recommended for academic publications.
"summary" produces threshold-level summaries where each
column represents one threshold, aggregating all configurations.
Logical. If TRUE (default), adds a note when multiple equivalent solutions exist explaining that M1 is shown.
Character. Style of solution note:
"simple" (default) or "detailed" (includes EPIs).
Character. Language for solution notes:
"en" (default) or "ja".
Logical. If TRUE and result$fiss_core exists
(i.e., compute_fiss_core has been run), the configuration
charts use full Fiss (2011) four-symbol notation distinguishing core
(present in both parsimonious and intermediate solutions) from peripheral
conditions (intermediate only). If FALSE (default) or if fiss_core
data is absent, the standard two-symbol chart is used.
Logical. If TRUE (default), includes the raw QCA package output (print(sol)) for each threshold for verification purposes.
Invisibly returns the path to the generated report.
if (FALSE) { # \dontrun{
data(sample_data)
thrX <- c(X1 = 7, X2 = 7, X3 = 7)
result <- otSweep(
dat = sample_data,
outcome = "Y",
conditions = c("X1", "X2", "X3"),
sweep_range = 6:8,
thrX = thrX,
return_details = TRUE
)
# With descriptive statistics and configuration charts
generate_report(result, "my_report.md", format = "full",
dat = sample_data, include_chart = TRUE)
# Without configuration charts
generate_report(result, "my_report.md", format = "simple",
include_chart = FALSE)
# With Fiss-style term-level charts (default, recommended for publications)
generate_report(result, "my_report.md", format = "full")
# With threshold-level summary charts
generate_report(result, "my_report.md", format = "full",
chart_level = "summary")
# With Fiss core/peripheral chart (requires compute_fiss_core)
res_fiss <- compute_fiss_core(result, conditions = c("X1", "X2", "X3"))
generate_report(res_fiss, "my_report.md", format = "full",
include_fiss_core = TRUE)
} # }