Skip to content
/ ciflyr Public

❗ This is a read-only mirror of the CRAN R package repository. ciflyr — Reachability-Based Primitives for Graphical Causal Inference. Homepage: https://cifly.dev/https://github.com/mwien/CIfly Report bugs for this package: https://github.com/mwien/CIfly/issues

License

Unknown, Unknown licenses found

Licenses found

Unknown
LICENSE
Unknown
LICENSE.note
Notifications You must be signed in to change notification settings

cran/ciflyr

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ciflyr

R-CMD-check

ciflyr is the R interface to the CIfly framework for designing efficient causal inference algorithms based on reductions to graph reachability specified by rule tables. For more information on CIfly, see our website and our paper.

Installation

install.packages("ciflyr")

Note that if the package is build from source on your system, as is the case for Linux distributions, the Rust toolchain needs to be installed.

Usage

As a basic example, we show how to test d-separation with CIfly. The CIfly algorithm specified by the rule table in the variable dsepTable returns all nodes d-connected to the set of nodes X given set Z. Based on this information, testing d-separation reduces to checking membership in a vector.

library(ciflyr)

dsepTable <- "
EDGES --> <--
SETS X, Z
START <-- AT X
OUTPUT ...

--> | <-- | current in Z
... | ... | current not in Z
"

test_dsep <- function(G, x, y, Z) {
      R <- reach(G, list("X" = x, "Z" = Z), dsepTable, tableAsString=TRUE)
      return (!(y %in% R))
}
# for graph 1 -> 2 -> 3, test whether 1 is d-separated from 3 by 2
print(test_dsep(list("-->" = rbind(c(1, 2), c(2, 3))), 1, 3, c(2)))
#> [1] TRUE

About

❗ This is a read-only mirror of the CRAN R package repository. ciflyr — Reachability-Based Primitives for Graphical Causal Inference. Homepage: https://cifly.dev/https://github.com/mwien/CIfly Report bugs for this package: https://github.com/mwien/CIfly/issues

Resources

License

Unknown, Unknown licenses found

Licenses found

Unknown
LICENSE
Unknown
LICENSE.note

Stars

Watchers

Forks

Packages

No packages published

Languages