Learn R Programming

causalDisco (version 1.0.1)

tges_run: Run the TGES Algorithm for Causal Discovery

Description

Perform causal discovery using the temporal greedy equivalence search algorithm.

Usage

tges_run(score, verbose = FALSE)

Value

A Disco object (a list with a caugi and a knowledge object).

Arguments

score

tiered scoring object to be used. At the moment only scores supported are

  • TemporalBIC and

  • TemporalBDeu.

verbose

indicates whether debug output should be printed.

Author

Tobias Ellegaard Larsen

Examples

Run this code
# Recommended route using disco:
kn <- knowledge(
  tpc_example,
  tier(
    child ~ starts_with("child"),
    youth ~ starts_with("youth"),
    old ~ starts_with("old")
  )
)

my_tges <- tges(engine = "causalDisco", score = "tbic")

disco(tpc_example, my_tges, knowledge = kn)

# another way to run it

my_tges <- my_tges |>
  set_knowledge(kn)
my_tges(tpc_example)


# or you can run directly with tges_run()

data(tpc_example)

score_bic <- new(
  "TemporalBIC",
  data = tpc_example,
  nodes = colnames(tpc_example),
  knowledge = kn
)

res_bic <- tges_run(score_bic)
res_bic

Run the code above in your browser using DataLab