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, tools:::Rd_expr_doi("10.1016/j.jspi.2009.05.030")), and their latent correlations are estimated by maximum likelihood as polychoric (Olsson, 1979, tools:::Rd_expr_doi("10.1007/BF02296207")) and polyserial (Olsson, Drasgow and Dorans, 1982, tools:::Rd_expr_doi("10.1007/BF02294164")) correlations. Unordered categories are placed on their latent coordinate in an order estimated from their association with the other variables. 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, optional hybrid copula and conditional CART or GAM synthesis for one continuous response (requiring 'rpart' or 'mgcv'), training-only automatic selection of the conditional engine, experimental nominal conditional synthesis of one unordered categorical response (requiring 'nnet'), 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, 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.
Fitting and generation: fit_synthesizer(), generate(),
synthesize(), simulate.sp_synthesizer(), generate_to_file().
Conditional synthesis of one target (experimental): nonlinear_target
(CART, GAM or automatic choice) and nominal_target (multinomial) in
fit_synthesizer(); see vignette("hybrid-nonlinear") and
vignette("nominal-synthesis").
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().
Maintainer: Bogdan Oancea [email protected] [copyright holder]
Authors:
Bogdan Oancea [email protected] [copyright holder]
Useful links: