Learn R Programming

eHDPrep (version 1.3.3)

compare_info_content_plt: Information Content Comparison Plot

Description

This function requires the output from compare_info_content. It is used to visualise the amount of information loss, if any, which has occurred in a merging procedure between two discrete variables.

Usage

compare_info_content_plt(compare_info_content_res)

Value

Plot of measures calculated in compare_info_content.

Arguments

compare_info_content_res

Output from compare_info_content.

Details

If the mutual information content between an input variable and the composite variable is equal to the information content of the input variable, it is confirmed that all information in the input variable has been incorporated into the composite variable.

See Also

compare_info_content

Examples

Run this code
data(example_data)
require(dplyr)
require(magrittr)
example_data %>%
   mutate(diabetes_merged = coalesce(diabetes_type, diabetes)) %>%
   select(starts_with("diabetes")) ->
   merged_data

compare_info_content(merged_data$diabetes,
                     merged_data$diabetes_type,
                     merged_data$diabetes_merged) %>%
                     compare_info_content_plt()

Run the code above in your browser using DataLab