dataComp {SynthTools} | R Documentation |
Checking for equality in the features of two data sets.
Description
This function will check for comparability between two data sets, including dimensions, order of variables, variable classifications, and levels of factors. When a data set is fully or partially synthesized from an observed data set, these are the features that should be equal between the data sets so the utility of the synthetic data can be measured.
Usage
dataComp(obs_data, new_data)
Arguments
obs_data |
The original data set to which the next will be compared, of the type "data.frame". |
new_data |
The fully or partially synthetic data set to be compared to the observed data, of the type "data.frame". |
Details
This function was developed with the intention of making the job of researching synthetic data utility a bit easier by making preliminary data set comparisons quickly.
Value
A list containing the following components:
same.dim |
A logical value indicating whether or not |
same.order |
A logical value indicating whether or not the variables in |
class.identical |
A logical value indicating where or not the variable classifications are identical. |
class.table |
A table of types of variable classifications. |
fac.num.same |
A logical value indicating whether or not the factors in the data sets have the same number of levels. |
fac.lev.same |
A logical value indicating whether or not the factors in the data sets have the same levels. |
Examples
#PPA is observed data set, PPAps1 is a partially synthetic data set derived from the observed data.
dataComp(PPA, PPAps1)