Learn R Programming

synthpop (version 1.9-1.1)

Generating Synthetic Versions of Sensitive Microdata for Statistical Disclosure Control

Description

A tool for producing synthetic versions of microdata containing confidential information so that they are safe to be released to users for exploratory analysis. The key objective of generating synthetic data is to replace sensitive original values with synthetic ones causing minimal distortion of the statistical information contained in the data set. Variables, which can be categorical or continuous, are synthesised one-by-one using sequential modelling. Replacements are generated by drawing from conditional distributions fitted to the original data using parametric or classification and regression trees models. Data are synthesised via the function syn() which can be largely automated, if default settings are used, or with methods defined by the user. Optional parameters can be used to influence the disclosure risk and the analytical quality of the synthesised data. For a description of the implemented method see Nowok, Raab and Dibben (2016) . Functions to assess identity and attribute disclosure for the original and for the synthetic data are included in the package, and their use is illustrated in a vignette on disclosure (Practical Privacy Metrics for Synthetic Data).

Copy Link

Version

Install

install.packages('synthpop')

Monthly Downloads

1,404

Version

1.9-1.1

License

GPL-2 | GPL-3

Maintainer

Beata Nowok

Last Published

June 3rd, 2025

Functions in synthpop (1.9-1.1)

compare

Comparison of synthesised and observed data
codebook.syn

Makes a codebook from a data frame
glm.synds, lm.synds

Fitting (generalized) linear models to synthetic data
disclosure

Disclosure measures
syn.bag

Synthesis with bagging
replicated.uniques

Replications in synthetic data
read.obs

Importing original data sets form external files
summary.fit.synds

Inference from synthetic data
numtocat.syn

Group numeric variables before synthesis
syn

Generating synthetic data sets
polr.synds

Fitting ordered logistic models to synthetic data
sdc

Tools for statistical disclosure control (sdc)
multinom.synds

Fitting multinomial models to synthetic data
summary.synds

Synthetic data object summaries
syn.pmm

Synthesis by predictive mean matching
syn.passive

Passive synthesis
syn.ctree, syn.cart

Synthesis with classification and regression trees (CART)
syn.nested

Synthesis for a variable nested within another variable.
syn.lognorm, syn.sqrtnorm, syn.cubertnorm

Synthesis by linear regression after transformation of a dependent variable
syn.logreg

Synthesis by logistic regression
syn.norm

Synthesis by linear regression
syn.ipf

Synthesis of a group of categorical variables by iterative proportional fitting
syn.catall

Synthesis of a group of categorical variables from a saturated model
syn.normrank

Synthesis by normal linear regression preserving the marginal distribution
syn.polr

Synthesis by ordered polytomous regression
synorig.compare

check synthetic and original if not produced by synthpop.
syn.ranger

Synthesis with a fast implementation of random forests
syn.smooth

syn.smooth
syn.rf

Synthesis with random forest
syn.polyreg

Synthesis by unordered polytomous regression
syn.sample

Synthesis by simple random sampling
syn.satcat

Synthesis from a saturated model based on all combinations of the predictor variables.
syn.survctree

Synthesis of survival time by classification and regression trees (CART)
synthpop-package

Generating synthetic versions of sensitive microdata for statistical disclosure control
utility.tables

Tables and plots of utility measures
utility.gen

Distributional comparison of synthesised and observed data
write.syn

Exporting synthetic data sets to external files
utility.tab

Tabular utility
multi.compare

Multivariate comparison of synthesised and observed data
compare.synds

Compare univariate distributions of synthesised and observed data
compare.fit.synds

Compare model estimates based on synthesised and observed data
mergelevels.syn

Merge levels of factors in a data frame
multi.disclosure

Disclosure measures for multiple of target variables.
SD2011

Social Diagnosis 2011 - Objective and Subjective Quality of Life in Poland