path_probability {stagedtrees} | R Documentation |
Compute probability of a path from root
Description
Internal function to compute probability of a path. It does not check the validity of the path.
Usage
path_probability(object, x, log = FALSE)
Arguments
object |
An object of class |
x |
the path, expressed as a character vector containing the sequence of the value of the variables. |
log |
logical, if |
Details
Computes the probability of following a given path (x
) starting from the root.
Can be a full path from the root to a leaf or a shorter path.
Value
The probability of the given path or its logarithm if log=TRUE
.
[Package stagedtrees version 2.3.0 Index]