extract_and_flatten_results_aggregated: Flatten Results for Export

View source: R/workflow_functions.R

extract_and_flatten_results_aggregatedR Documentation

Flatten Results for Export

Description

Prepares the comprehensive results list for export (e.g., to Microsoft Excel). Converts all htest objects and per-model results into flat data.frame objects, one per dataset.

Usage

extract_and_flatten_results_aggregated(comprehensive_results, alpha = 0.05)

Arguments

comprehensive_results

list output from run_comprehensive_erc_analysis.

alpha

Numeric significance level used to determine Reject_H0. Default is 0.05.

Value

list of data frames, one per dataset, each with columns: Model, Test_Type, P_Value, Statistic, Actual_Violations, Reject_H0.

See Also

run_comprehensive_erc_analysis, create_unified_summary, generate_comprehensive_report

Examples


data(metals)
realizations <- list(M = metals[, ncol(metals)])
prep_list    <- list(M = list(R_start = 0))
f_hat        <- list(list(NULL, NULL, metals))
names(f_hat) <- "M"
res <- run_comprehensive_erc_analysis(
  data_list_prepared = prep_list,
  mods_matrix        = matrix(0),
  alpha_grid         = 0.05,
  window_size        = 20,
  y_hat_all          = f_hat,
  y_raw              = realizations,
  block_length       = 5,
  n_boot             = 10,
  zp_quantile        = 0.05
)
excel_data <- extract_and_flatten_results_aggregated(res$aggregate_results, alpha = 0.05)
head(excel_data[[1]])


RCtest documentation built on June 2, 2026, 9:07 a.m.