replicated.uniques | R Documentation |
Determines which unique units in the synthesised data set(s) have combinations of variables in the keys as follows:
1) unique in original data
2) unique in the synthetic data set(s)
3) unique in synthetic data and present,but not necessarily unique in original
4) unique in synthetic and unique in original.
For each of 3) and 4) results are returned that identify the rows in the
synthetic data with each type of unique.
This function is called by sdc
where there are options to
include each type of unique.
replicated.uniques(object, data, keys = names(data))
## S3 method for class 'repuniq.synds'
print(x, ...)
object |
an object of class |
data |
the original observed data set. |
keys |
Variables to be used as quasi-identifiers to check for unique combinations. |
... |
additional parameters |
x |
an object of class |
A list of class "repuniq.synds" with the following components:
m |
number of synthetic data sets in object |
n |
number of rows in data |
k |
number of rows in of synthetic data set(s) in object |
res_tab |
Table or list of tables with numbers and percentages of uniques |
synU.rm |
A vector of length |
repU.rm |
A vector of length |
sdc
ods <- SD2011[1:1000,c("sex","age","region","edu","marital","smoke")]
s1 <- syn(ods, m = 2)
replicated.uniques(s1,ods, keys = c("sex","age","region"))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.