Skip to contents

This is adapted from mstate::trans.illness. Create a complete binary tree transition matrix.

Usage

trans_binarytree(names, depth = 2)

Arguments

names

Node names

depth

Depth of tree; integer

Value

Matrix of TRUE and FALSE

Examples


trans_binarytree(c("A", "B"), depth = 2)
#>     to
#> from  1  2  3  4  5
#>    1 NA  1  2 NA NA
#>    2 NA NA NA  3  4