compare_info_content_plt {eHDPrep} | R Documentation |
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.
compare_info_content_plt(compare_info_content_res)
compare_info_content_res |
Output from
|
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.
Plot of measures calculated in compare_info_content
.
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()