seqaddNA: Generation of missing data under the form of gaps, which is...

View source: R/missings_generation.R

seqaddNAR Documentation

Generation of missing data under the form of gaps, which is the typical form of missing data with longitudinal data. A missing completely at random (MAR) mechanism is used.

Description

Generation of missing data under the form of gaps, which is the typical form of missing data with longitudinal data. A missing completely at random (MAR) mechanism is used.

Usage

seqaddNA(
  data,
  states.high = NULL,
  propdata = 1,
  pstart.high = 0.1,
  pstart.low = 0.005,
  maxgap = 3
)

Arguments

data

either a data frame containing sequences of a multinomial variable with missing data (coded as NA) or a state sequence object built with the TraMineR package

states.high

list of states that will have a larger probability to trigger a subsequent gap of missing data

propdata

proportion of the observations on which missing data will be simulated

pstart.high

probability to start a missing data for the specified states

pstart.low

probability to start a missing data for the other states

maxgap

maximum length of a gap of missing data

Value

Returns either a data frame or a state sequence object, depending the type of data that was provided to the function


seqimpute documentation built on March 19, 2024, 3:09 a.m.