replicated.uniques: Replications in synthetic data

View source: R/IO.r

replicated.uniquesR Documentation

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

sdc

Examples

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

bnowok/synthpop documentation built on Sept. 1, 2022, 2:41 p.m.