Amelia (version 1.8.0)

missmap: Missingness Map


Plots a missingness map showing where missingness occurs in the dataset passed to amelia.


missmap(obj, vars, legend = TRUE, col, main, y.cex = 0.8,
  x.cex = 0.8, y.labels,, csvar = NULL, tsvar = NULL,
  rank.order = TRUE, margins = c(5, 5), gap.xaxis = 1, x.las = 2,



an object of class "amelia"; typically output from the function amelia, a matrix or a dataframe.


a vector of column numbers or column names of the data to include in the plot. The default is to plot all variables.


should a legend be drawn? (True or False)


a vector of length two where the first element specifies the color for missing cells and the second element specifies


main title of the plot. Defaults to "Missingness Map".


expansion for the variables names on the x-axis.


expansion for the unit names on the y-axis.


a vector of row labels to print on the y-axis

a vector of the same length as y.labels with row nmumbers associated with the labels.


column number or name of the variable corresponding to the unit indicator. Only used when the obj is not of class amelia.


column number or name of the variable corresponding to the time indicator. Only used when the obj is not of class amelia.


a logical value. If TRUE, the default, then the order of the variables along the the x-axis is sorted by the percent missing (from highest to lowest). If FALSE, it is simply the order of the variables in the data.


a vector of length two that specifies the bottom and left margins of the plot. Useful for when variable names or row names are long.


value to pass to the gap.axis argument of the axis function that plots the x-axis. See axis for more details. Ignored on R versions less than 4.0.0.


value of the las argument to pass to the axis function creating the x-axis.


further graphical arguments.


missmap draws a map of the missingness in a dataset using the image function. The columns are reordered to put the most missing variable farthest to the left. The rows are reordered to a unit-period order if the ts and cs arguments were passed to amelia. If not, the rows are not reordered.

The y.labels and commands can be used to associate labels with rows in the data to identify them in the plot. The y-axis is internally inverted so that the first row of the data is associated with the top-most row of the missingness map. The values of should refer to the rows of the data, not to any point on the plotting region.

See Also

compare.density, overimpute, tscsPlot, image, heatmap