Learn R Programming

wsMed (version 1.0.2)

summarize_mc_ci: Summarize Monte Carlo Simulation Results

Description

Computes summary statistics for Monte Carlo simulation results, including the mean estimate, standard error (SE), and confidence intervals (CIs).

Usage

summarize_mc_ci(mc_result, alpha = 0.05)

Value

A data frame with one row per parameter and the following columns:

Parameter

The name of the parameter.

Estimate

The average estimate across all Monte Carlo replications.

SE

The standard deviation of the estimates (standard error).

CI_lower

The lower bound of the confidence interval.

CI_upper

The upper bound of the confidence interval.

Arguments

mc_result

A data frame where each column corresponds to a parameter, and each row represents one Monte Carlo replication of that parameter's estimate.

alpha

Numeric. Significance level used to compute the (1 - alpha) confidence interval. Default is 0.05 for a 95% confidence interval.