compare_info_content_plt {eHDPrep}R Documentation

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)

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.

Value

Plot of measures calculated in compare_info_content.

See Also

compare_info_content

Examples

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()

[Package eHDPrep version 1.2.1 Index]