Skip to contents

Simulate a Markov model broken down by ID

Usage

simMarkovId(data, initialState, prCols)

Arguments

data

A data.frame for the individual with columns for each of the state transition probabilities

initialState

The initial Markov state

prCols

A named list of probability columns. List names are the previous state, and list values are a character vector of probability columns.

Value

A data.frame with two columns named "prev" and "cur"