payoff: Calculate Weighted Expectations

Description Usage Arguments Details Value

View source: R/payoff.R

Description

Calculates sum of probabilities multiplied by values (e.g. cost) for all branches in decision tree.

Usage

1
payoff(node)

Arguments

node

The node of a data.tree package tree object

Details

(previous version: Gives maximum payoff, given optimal decisions) This is the original example using data.tree

Value

jl$Do(payoff, traversal = "post-order", filterFun = isNotLeaf)


n8thangreen/treeSimR documentation built on Feb. 20, 2022, 11:54 a.m.