Compute flow of costs given a tree of probability

compute.cost.prob(cost_base, cost_change, tree)

Arguments

cost_base

vector of base costs.

cost_change

vector of change costs.

tree

matrix of probability of being in a given branch. First column is for the basic states, the other are for the change states. Beware tree must be "cumulative".

Value

vector of compounded costs

Author

Frédéric Grelot, frederic.grelot.1994_cran@m4x.org