Returns the probability the fitted tree assigns to a given pathway / next-state pair. Two lookup modes:
exact = TRUE: the pathway must appear as a node; otherwise returnsNA.exact = FALSE(default): if the pathway is missing, falls back to the longest matching suffix that *is* in the tree (mirrorspredict.transitiontrees()).
Arguments
- tree
A
transitiontrees.- pathway
Character. The conditioning pathway, either as a single arrow-notation string ("A -> B -> C") or as a character vector of states (
c("A","B","C")).- next_state
Character. Next-state symbol to query, or
NULL(default) to return the full conditional distribution.- exact
Logical. Default
FALSE— fall back to longest matching suffix.