ms_generator: Generator and permitted-transition matrices

View source: R/structures.R

ms_generatorR Documentation

Generator and permitted-transition matrices

Description

Returns the structurally valid infinitesimal generator for a built-in structure, with the reference intensities used in the package documentation, or the indicator matrix of permitted transitions.

Usage

ms_generator(process, rates = NULL)

ms_allowed(process)

Arguments

process

Character. One of ms_structures().

rates

Optional numeric vector of replacement off-diagonal intensities, in row-major order of the permitted transitions.

Value

ms_generator returns a square generator matrix with zero row sums. ms_allowed returns the corresponding matrix of zeros and ones.

Examples

ms_generator("illness_death_3state")
ms_allowed("competing_risks")
ms_generator("two_state", rates = 0.35)

modMStates documentation built on Sept. 3, 2026, 5:10 p.m.