Skip to contents

A ledger is a table with rows that identify specific instances of a functional form used to define a mp_dynamic_model. Ledgers are most commonly created using the mp_join function as in the following example.

age = mp_index(Age = c("young", "old"))
state = mp_cartesian(
  mp_index(Epi = c("S", "I", "R")),
  age
)
mp_join(
  from = mp_subset(state, Epi = "S"),
  to = mp_subset(state, Epi = "I"),
  by = list(from.to = "Age")
)
#>     from      to
#>  S.young I.young
#>    S.old   I.old