This article describes how to create a chart showing the missing data by case in the data file. Each "column" represents a different variable, and the shading indicates missing values. The chart supports hover and zoom.
A Displayr document with a data set.
- Go to Anything > Data > Missing Data > Plot by Case.
- In the object inspector, under Inputs > DATA SOURCE > Variables select the variables you want to visualize, change any other settings, and click Calculate to run the function.
OPTIONAL: You can update the following settings to change your output:
From Inputs > DATA SOURCE:
- Variable names - Show variable names instead of labels.
- Show hover text - Show index of missing cases on hover. This may be quite slow if the number of missing cases is large.
- Show number of cases missing - Include the number of cases missing in the X axis labels.
- Show percentage of cases missing - Include the percentage of data missing in the X axis labels.
- Fill color - Color used to display missing cases.
- Background color - Color used to display non-missing cases.
- Global font family - Font family used in the all of the text elements. This can be overridden for specific text elements in the controls below.
- Global font color - Font color used in all the text elements in the chart. This can be overridden for specific text elements in the controls below.
- Show data labels - Show index of missing cases as data labels on the chart. This can be useful for using the chart when hover is not available. However, it is often not useful if the number of missing cases is large because labels will overlap.
- Data label background opacity - By default there is a background that is set to 0.5 so that the data labels can be easily seen above the chart lines. However, if the number of cases are few, so the filled areas are more rectangle like, it may be better to set the opacity to 0.
- Title - Optional title to show in chart.
- Subtitle - Optional subtitle to show in chart.
- Footer - Optional footer to show in chart.
- X axis label orientation - Whether to show the labels horizontally or vertically. If this is set to automatic, labels will be placed horizontally if there are less than 10 variables and vertically otherwise.
- Wrap X axis label - Whether labels should be wrapped across multiple lines if they are too long.
- X axis label width (in characters) - Maximum number of characters before a line is wrapped.
- Customize margins - Select this option to manually specify margin sizes (in pixels).