seqmissfplot: Plot the most common patterns of missing data.

View source: R/plots.R

seqmissfplotR Documentation

Plot the most common patterns of missing data.

Description

This function plots the most frequent patterns of missing data, based on the seqfplot function.

Usage

seqmissfplot(data, var = NULL, with.complete = TRUE, void.miss = TRUE, ...)

Arguments

data

Either a data frame containing sequences of a categorical variable, where missing data are coded as NA, or a state sequence object created using the seqdef function.

var

A vector specifying the columns of the dataset that contain the trajectories. Default is NULL, meaning all columns are used.

with.complete

Logical, if TRUE, complete trajectories will be included in the plot.

void.miss

Logical, if TRUE, treats void elements as missing values. Applies only to state sequence objects created with seqdef. Note that the default behavior of seqdef is to treat missing data at the end of sequences as void elements.

...

Additional parameters passed to the seqfplot function.

Details

This plot function is based on the seqfplot function, allowing users to visualize patterns of missing data within sequences. For details on additional customizable arguments, see the seqfplot documentation.

By default, this function plots the 10 most frequent patterns. The number of patterns to be plotted can be adjusted using the idxs argument in seqfplot.

Author(s)

Kevin Emery

Examples

# Plot the 10 most common patterns of missing data

seqmissfplot(gameadd, var = 1:4)

# Plot the 10 most common patterns of missing data discarding
# complete trajectories

seqmissfplot(gameadd, var = 1:4, with.missing = FALSE)

# Plot only the 5 most common patterns of missing data discarding
# complete trajectories

seqmissfplot(gameadd, var = 1:4, with.missing = FALSE, idxs = 1:5)


seqimpute documentation built on April 12, 2025, 1:54 a.m.