| tges | R Documentation |
Run the Temporal Greedy Equivalent Search algorithm for causal discovery using one of several engines.
tges(engine = c("causalDisco"), score, ...)
engine |
Character; which engine to use. Must be one of:
|
score |
Character; name of the scoring function to use. |
... |
Additional arguments passed to the chosen engine (e.g. test or algorithm parameters). |
For specific details on the supported scores, see CausalDiscoSearch. For additional parameters
passed via ..., see tges_run().
While it is possible to call the function returned directly with a data frame,
we recommend using disco(). This provides a consistent interface and handles knowledge
integration.
A function that takes a single argument data (a data frame). When called,
this function returns a list containing:
knowledge A Knowledge object with the background knowledge
used in the causal discovery algorithm. See knowledge() for how to construct it.
caugi A caugi::caugi object (of class PDAG) representing the learned causal graph
from the causal discovery algorithm.
Larsen TE, Ekstrøm CT, and Petersen AH. Score-Based Causal Discovery with Temporal Background Information, 2025. doi:10.48550/arXiv.2502.06232.
Other causal discovery algorithms:
boss(),
boss_fci(),
fci(),
ges(),
gfci(),
grasp(),
grasp_fci(),
gs(),
iamb-family,
pc(),
sp_fci(),
tfci(),
tpc()
# 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
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.