Learn R Programming

stagedtrees (version 2.3.0)

ci_matrices: 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)

Value

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

Arguments

object

an object of class sevt.

var

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

Examples

Run this code
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")

Run the code above in your browser using DataLab