miss_cat
takes a data frame, df , and two variables as strings, var1 and var2, and converts them to a missing TRUE/FALSE matrix, where TRUE = missing. It then uses interaction
, to create all the different levels of missingness - TRUE.TRUE, TRUE.FALSE, FALSE.TRUE, and FALSE.FALSE. It then uses the function shadow_cat
to collapse across these and put them into the relevant categories
miss_cat(df, var1, var2)
a dataframe
a dataframe
a dataframe