pzivich / zEpid

Epidemiology analysis package
http://zepid.readthedocs.org
MIT License
141 stars 33 forks source link

Missing Data Pattern Plot #137

Open pzivich opened 4 years ago

pzivich commented 4 years ago

It would be useful to have a plot measure (either through matplotlib or through the console) that shows the missing data pattern (i.e. monotonic versus non-monotonic). Something resembling : https://www.ncbi.nlm.nih.gov/pmc/articles/PMC5860553/figure/kwx350F1/

Procedure would be something like the following: 1) Detect which columns have missing data 2) Construct 2-by-2 tables of missingness indicators for each combination. Depending on if any cell has a zero, create an indicator. Something like, non-monotone, monotonic (in what direction), always missing with the other 3) Fill in plot based on table results