Learn R Programming

gmwmx2 (version 0.0.5)

markov_two_states: Markov two-state missingness model (missingness_model)

Description

Constructs a missingness_model representing a two-state Markov process for missing/observed indicators. The process takes values in {0, 1}, where 1 indicates observed and 0 indicates missing.

Usage

markov_two_states(p1 = NULL, p2 = NULL)

Value

A missingness_model object.

Arguments

p1

Transition probability from observed (1) to missing (0).

p2

Transition probability from missing (0) to observed (1).

Examples

Run this code
mod <- markov_two_states(p1 = 0.05, p2 = 0.95)
mod
z <- generate(mod, n = 200, seed = 123)
plot(z)

Run the code above in your browser using DataLab