Learn R Programming

seqimpute (version 2.2.1)

seqmissimplic: Identification and visualization of states that best characterize sequences with missing data

Description

This function identifies and visualizes states that best characterize sequences with missing data at each position (time point), comparing them to sequences without missing data at each position (time point). It is based on the seqimplic function. For more information on the methodology, see the seqimplic documentation.

Usage

seqmissimplic(data, var = NULL, void.miss = TRUE, ...)

Value

returns a seqimplic object that can be plotted and printed.

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.

void.miss

Logical, if TRUE, treats void elements as missing values. This argument 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.

...

parameters to be passed to the seqimplic function

Author

Kevin Emery

Examples

Run this code

# For illustration purpose, we simulate missing data on the mvad dataset,
# available in the TraMineR package. The state "joblessness" state has a
# higher probability of triggering a missing gap

if (FALSE) {
data(mvad, package = "TraMineR")
mvad.miss <- seqaddNA(mvad, var = 17:86, states.high = "joblessness")

# The states that best characterize sequences with missing data
implic <- seqmissimplic(mvad.miss, var = 17:86)

# Visualization of the results
plot(implic)
}

Run the code above in your browser using DataLab