R/simulations_synthetic.R
simulate_rvine.RdSimulates multivariate time series data using R-vine copulas while preserving the dependence structure and marginal distributions of the original data.
simulate_rvine(
data,
n = 100,
seed = 123,
verbose = FALSE,
n_trials = 10,
oversample_factor = 1.5,
score_weights = c(0.4, 0.2, 0.2, 0.1, 0.1)
)Matrix or data.frame of multivariate time series
Number of simulations to generate
Random seed for reproducibility
Whether to print fitting information
Number of trials to select best fit
Factor to oversample for better selection (default 1.5)
Vector of weights for scoring criteria. Must be length 5 and sum to 1. Order: [Kendall_cor, Pearson_cor, KS_test, mean_error, sd_error]
A list of class 'rvine_simulation' containing:
simulated_data - The simulated multivariate time series
diagnostics - Comprehensive diagnostic information including:
Correlation matrices and errors
Distribution comparison metrics
Quality scores and trial results
Model information