path_probability: Compute probability of a path from root

View source: R/3-inference-functions.R

path_probabilityR 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 sevt.

x

the path, expressed as a character vector containing the sequence of the value of the variables.

log

logical, if TRUE log-probability is returned.

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.


stagedtrees documentation built on April 29, 2022, 1:06 a.m.