View source: R/missings_generation.R
seqaddNA | R 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.
seqaddNA(
data,
states.high = NULL,
propdata = 1,
pstart.high = 0.1,
pstart.low = 0.005,
maxgap = 3
)
data |
either a data frame containing sequences of a multinomial variable with missing data (coded as |
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 |
Returns either a data frame or a state sequence object, depending the type of data that was provided to the function
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.