SynthesizerPlus-package: SynthesizerPlus: Synthetic Data Generation with Copulas,...

SynthesizerPlus-packageR Documentation

SynthesizerPlus: Synthetic Data Generation with Copulas, Evaluation and Multi-Format I/O

Description

Generates synthetic versions of numeric, categorical, mixed-type and time-series data. Marginal distributions are modelled with interpolated empirical quantile functions and dependence with Gaussian or Student-t copulas (Sklar, 1959). Discrete and categorical variables enter the copula through the distributional transform (Ruschendorf, 2009, \Sexpr[results=rd]{tools:::Rd_expr_doi("10.1016/j.jspi.2009.05.030")}), and their latent correlations are estimated by maximum likelihood as polychoric (Olsson, 1979, \Sexpr[results=rd]{tools:::Rd_expr_doi("10.1007/BF02296207")}) and polyserial (Olsson, Drasgow and Dorans, 1982, \Sexpr[results=rd]{tools:::Rd_expr_doi("10.1007/BF02294164")}) correlations. Missing values are modelled by missingness indicators inside the copula, so that missingness may depend on other variables. Supports stratified models, a closeness parameter with calibration to a target distance or disclosure-risk level, chunked generation of very large data sets, copula vector-autoregressive and bootstrap time-series synthesis, augmentation of small training sets for machine learning, and random generation from multivariate distributions and elliptical and Archimedean copulas. Fidelity, utility and disclosure risk are assessed with marginal distances, association matrices, propensity score mean-squared error (Snoke et al., 2018, \Sexpr[results=rd]{tools:::Rd_expr_doi("10.1111/rssa.12358")}), confidence-interval overlap, correct attribution probability and distance to closest record, with 'ggplot2' visualisations. Data can be read from and written to CSV, TSV, RDS, RData, Parquet, Feather, HDF5, JSON, NDJSON, Excel, SPSS, Stata, SAS and fst files. The empirical-quantile and copula approach builds on ideas of the 'synthesizer' package by Mark van der Loo.

Main functions

  • Fitting and generation: fit_synthesizer(), generate(), synthesize(), simulate.sp_synthesizer(), generate_to_file().

  • Disclosure control: disclosure_risk(), dcr(), census_sim data.

  • Closeness to the real data: closeness in generate(), perturbation(), calibrate_closeness().

  • Time series: fit_synthesizer.ts().

  • Machine-learning augmentation: augment_data(), ts_windows().

  • Multivariate distributions: r_mvnorm(), r_mvt(), r_mvskewnorm(), r_dirichlet(), r_mvmixture(), r_copula(), r_mvdist(), make_corr().

  • Evaluation: compare_synthetic(), marginal_metrics(), association_matrix(), pmse(), discriminator_auc(), ci_overlap(), dcr().

  • Visualisation: plot_marginals(), plot_association(), plot_pairs(), plot_qq(), plot_ts(), plot_acf(), plot_dcr().

  • Input/output: read_data(), write_data(), supported_formats(), match_types().

Author(s)

Maintainer: Bogdan Oancea bogdan.oancea@gmail.com [copyright holder]

Authors:

See Also

Useful links:


SynthesizerPlus documentation built on Oct. 16, 2026, 5:10 p.m.