ci_matrices {stagedtrees}R Documentation

Conditional independences matrices of stages

Description

Generate the sequence of all the conditional independences matrices of stages for a given variable in the model.

Usage

ci_matrices(object, var)

Arguments

object

an object of class sevt.

var

string, the name of one of the variables in object.

Value

A list with i-1 matrices, where i is the depth of variable var in the tree.

Examples

mod <- sevt(list(A = c("a", "aa"),
                 B = c("b", "bb", "bbb"),
                 C = c("c", "cc")), full = TRUE)
stages(mod)["C", A = "a", B = c("b", "bb")] <- "stage1"
stages(mod)["C", A = "aa"] <- "stage2"
stages(mod)["C", A = "a", B = "bbb"] <- "stage2"

ci_matrices(mod, "C")

[Package stagedtrees version 2.3.0 Index]