dataComp: Checking for equality in the features of two data sets.

Description Usage Arguments Details Value Examples

View source: R/dataComp.R

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

1
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 obs_data and new_data have the same dimensions.

same.order

A logical value indicating whether or not the variables in obs_data and new_data are in the same order.

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

1
2
3
#PPA is observed data set, PPAps1 is a partially synthetic data set derived from the observed data.

dataComp(PPA, PPAps1)

RTIInternational/SynthTools documentation built on Oct. 30, 2019, 10:50 p.m.