Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

replicated.uniques

Replications in synthetic data


Description

Determines which unique units in the synthesised data set(s) replicates unique units in the original observed data set.

Usage

replicated.uniques(object, data, exclude = NULL)

Arguments

object

an object of class synds, which stands for 'synthesised data set'. It is typically created by function syn() and it includes object$m synthesised data set(s).

data

the original observed data set.

exclude

a single string or a vector of strings with name(s) of variable(s) to be excluded from the identification of uniques.

Value

A list with the following components:

replications

a vector (for object$m = 1) or a data frame with object$m columns (for object$m > 1) with logical values indicateing duplicates in mth synthetic data set.

no.replications

a single number or a vector of object$m integers indicating the number of duplicates in the synthetic data set(s).

no.uniques

a number of unique individuals in the original data set.

per.replications

a single number or a vector of object$m numeric values indicating the percentage of duplicates in the synthetic data set(s).

See Also

Examples

ods <- SD2011[1:1000,c("sex","age","edu","marital","smoke")]
s1 <- syn(ods, m = 2)
replicated.uniques(s1,ods)

synthpop

Generating Synthetic Versions of Sensitive Microdata for Statistical Disclosure Control

v1.6-0
GPL-2 | GPL-3
Authors
Beata Nowok [aut, cre], Gillian M Raab [aut], Chris Dibben [ctb], Joshua Snoke [ctb], Caspar van Lissa [ctb]
Initial release
2020-09-03

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.