seqmissimplic: Identification and visualization of states that best...

View source: R/plots.R

seqmissimplicR Documentation

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, ...)

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

Value

returns a seqimplic object that can be plotted and printed.

Author(s)

Kevin Emery

Examples


# 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

## Not run: 
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)

## End(Not run)


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