Analyzes convergence in Monte Carlo simulations by computing statistical measures across iterations. Calculates both standardized and raw differences between consecutive iterations to evaluate stability and convergence.
Value
A data frame with convergence statistics per node:
expression: Expression identifier
variate: Variate identifier
node: Node identifier
max_std_dif: Max of standardized differences
max_dif: Max of raw differences
conv_threshold: Convergence at custom threshold (TRUE/FALSE), if threshold provided
conv_01: Convergence at 1% std threshold (TRUE/FALSE)
conv_025: Convergence at 2.5% std threshold (TRUE/FALSE)
conv_05: Convergence at 5% std threshold (TRUE/FALSE)
Details
The function performs the following:
Calculates convergence statistics for specified quantile range
Generates diagnostic plots for standardized and raw differences
Provides detailed convergence summary including:
Total nodes analyzed
Number and percentage of nodes converged at different thresholds
Maximum/minimum deviations
List of non-converged nodes (if any)