Skip to contents

Executes the Bayesian power analysis using the configuration specified in the rctbp_power_analysis object. This method contains the core simulation logic and returns comprehensive results.

Arguments

x

An S7 object of class "rctbp_power_analysis"

...

Additional arguments (currently unused)

Value

A list of class "rctbayespower_sim_result" containing:

  • results_df: Aggregated power analysis results

  • results_df_raw: Raw simulation results from all runs

  • design: The design object used for analysis

  • conditions: The condition specifications used

  • n_sims: Number of simulations per condition

  • elapsed_time: Total analysis runtime

Details

This method implements the core power analysis algorithm:

Parallel Execution: When n_cores > 1, simulations are distributed across multiple cores for optimal performance.

Progress Tracking: Progress is shown through pbapply when available, with fallback to basic progress reporting.

Error Handling: Robust error handling ensures partial results are preserved even if some simulations fail.

Result Aggregation: Individual simulation results are aggregated into power curves and summary statistics.