Calculates sum of probabilities multiplied by values (e.g. cost) for all branches in decision tree.
payoff(node)
node | The node of a data.tree package tree object |
---|
jl$Do(payoff, traversal = "post-order", filterFun = isNotLeaf)
(previous version: Gives maximum payoff, given optimal decisions) This is the original example using data.tree