plot_missing_values {bootUR}R Documentation

Plot Missing Values


Plots missing values of different types for a time series dataset.


plot_missing_values(y, show_names = FALSE, show_legend = TRUE,
  axis_text_size = NULL, legend_size = NULL, cols = NULL)



A (TxN)-matrix of N time series with T observations. Data may also be in a time series format (e.g. ts, zoo or xts) or data frame.


Show the time series' names on the plot (TRUE) or not (FALSE). Default is TRUE.


Logical indicator whether a legend should be displayed. Default is TRUE.


Size of the text on the axis. Default takes ggplot2 defaults.


Size of the text in the legend if show_legend = TRUE. Default takes ggplot2 defaults.


Vector with colours for displaying the different types of data. If the default is overwriten, four colours must be supplied.


The function distinguish four types of data: observed data (non-missing) and three missing types. Type "Balanced NA" indicates where entire rows are missing (NA). These do not cause unbalancedness as the missing rows can simply be deleted. Type "Unalanced NA" are missing values on the beginning or end of the sample, which cause unbalancedness. These affect some (but not all) bootstrap methods, see e.g.~bFDRtest. Type "Internal NA" are missing values inside the sample, which need to be removed before the bootstrap unit root tests can be used.

This function requires the package ggplot2 to be installed. If the package is not found, plotting is aborted.


A ggplot2 object containing the missing values plot.

[Package bootUR version 0.2.0 Index]