causalDisco 1.3.0
CRAN release: 2026-11-17
New features
Added
max_lag()/set_max_lag()toknowledge(), which forbids edges between variables that are more than a given number of tiers apart.max_lag()is set insidetier(), alongside its formulas:tier(1 ~ V1, 2 ~ V2, max_lag(1)).-
Tetrad algorithms now expose more of Tetrad’s parameters, all defaulting to Tetrad’s own defaults:
-
grasp()gainsuse_score,allow_internal_randomness,output_cpdagandseed. Setallow_internal_randomness = FALSEfor reproducible results. -
grasp_fci()gainsuse_score,use_heuristic,exclude_selection_biasandseed. -
pc()gainscollider_orientation_style,allow_bidirectedandfdr_q. -
fci()gainscollider_orientation_style,do_possible_dsep,exclude_selection_biasandfdr_q. -
rfci()gainsexclude_selection_biasandfdr_q. -
ges()gainsnum_threads;boss()gainsnum_threadsandseed. -
boss_fci(),gfci()andsp_fci()gainexclude_selection_bias.
-
plot()gainsequal_node_size. By default, all nodes are now drawn the same size, fitted to the longest label. Useequal_node_size = FALSEfor the previous behaviour, where each node is sized to its own label.tpc_run()now supportsorientation_method = "standard"and"maj_rule".-
make_tikz()gains:-
style = "classic": plain-text nodes, gray tier bands, and a time axis. -
node_labelsandtier_labelsfor LaTeX labels, e.g.c(X1 = "$X_1$"). - Edges that would pass through another node are bent around it, as in
plot(), and bent edges leaving a node together are spread apart. An edge whose bend would pass through a node is bent the other way, or by the nearest angle tobendthat clears it.edge_style = list(route = FALSE)turns both adjustments off. -
bendsets the bend of all edges in degrees (0= straight, negative = the other way), or of individual edges with a list, e.g.list(default = 20, A = list(B = 0)). - The output defines named styles (
var,link,tier,tier label) instead ofevery node/every path, which also styled the tiers.
-
Lifecycle changes
orientation_method = "maj.rule"intpc_run()andtfci_run()is deprecated in favour of"maj_rule".make_tikz(bend_edges, bend_angle)are deprecated in favour ofbend:bend_edges = TRUE, bend_angle = 15is nowbend = 15, andbend_edges = FALSEisbend = 0.
Bug fixes
verify_tetrad()no longer reports Tetrad as not installed after a successfulinstall_tetrad()when theTETRAD_DIRenvironment variable is set. The (undocumented)TETRAD_DIRis no longer used; setoptions(causalDisco.tetrad_cache = )to use a custom directory instead.make_tikz()now draws PAG edge marks (o->,o-o,--o) instead of warning.make_tikz()with bent edges now bends edges in both directions (A --> B,B --> A) to opposite sides instead of drawing them on top of each other.install_tetrad(version = )now saves a non-default Tetrad version in its own cache directory instead of the default version’s, and Java loads only the JAR for the configured version.tpc_run()now orients conservatively by default, as documented; it previously used standard orientation.-
Removed Tetrad algorithm arguments that Tetrad ignored, so setting them had no effect:
-
pc():conflict_rule,guarantee_cpdag -
ges():parallelized(usenum_threads) -
rfci():stable_fas,complete_rule_set_used -
grasp_fci():stable_fas,covered_depth -
sp_fci():depth - Also in
TetradSearch$set_alg():cpcandpc_max(conflict_rule,guarantee_cpdag,use_heuristic,max_disc_path_length),fcit(guarantee_pag,max_disc_path_length),restricted_boss(allow_internal_randomness) andccd(depth).
-
use_heuristicingfci()andsp_fci()had no effect because it set the wrong Tetrad parameter. It now controls the max-p heuristic as documented.boss_fci()’snum_threadswas never passed to Tetrad. It is now, and its default changes from 0 to Tetrad’s default of 1.pc(engine = "pcalg")no longer errors when the estimated graph contains a cycle. Now emits a message and returns the graph with its class downgraded to"UNKNOWN".
causalDisco 1.2.1
CRAN release: 2026-07-20
New features
Added support for the RFCI algorithm via
rfci(), interfacing with implementations from pcalg and Tetrad.The infix edge operators
%-->%and%!-->%inknowledge()now accept+on both sides to specify multiple variables, e.g.A + B %-->% C + Dis equivalent toc(A, B) %-->% c(C, D).The infix edge operators
%-->%and%!-->%inknowledge()now support tidyselect set operations such as!,&, and|on either side, e.g.child_x1 %!-->% !starts_with("child").You can now plug a fully custom, user-written search algorithm into the causalDisco engine and run it through
disco()(viaCausalDiscoSearch$set_alg()andmake_method()). See the “Extending causalDisco with new algorithms” article for a worked example.Added
register_engine(), which lets you plug in an entirely new engine backend (i.e. one not built on bnlearn, causalDisco, pcalg, or Tetrad) so. See the “Extending causalDisco with new algorithms” article for a worked example.
Deprecated
The
summary()methods forKnowledgeandDiscoobjects are deprecated; useprint()instead.The
directed_as_undirectedargument oftpc_run(),tfci_run(), andCausalDiscoSearch$set_knowledge()is deprecated and ignored; see the related bug-fix entry below for the new handling of directed forbidden edges.The internal-only
directed_as_undirected_knowledgeargument ofmake_runner()has been removed, and thedirected_as_undirectedargument ofPcalgSearch$set_knowledge()andas_pcalg_constraints()is deprecated and ignored.as_pcalg_constraints()no longer returns afixed_edgesmatrix. pcalg’sfixedEdgesargument only protects an undirected adjacency in the skeleton, so a directed required edge (A %-->% B) cannot be honored through it.
Bug fixes
Fixed
tpc()andtfci()silently treating directed forbidden edges as undirected: forbiddingi %!-->% jalso forbiddenj !--> i. Forbidden edges now follow the same rule as the pcalg engine: both directions must be supplied explicitly, otherwise an error is raised. The exception is if theKnowledgeforbidden knowledge is equivalent to tiered knowledge.Fixed
knowledge()dropping variables fromtier()formulas when infix edge operators (%-->%,%!-->%) appeared before thetier()call and had already registered some (but not all) of the tier’s variables. This only affected the no-data-frame form ofknowledge().
Improvements
The
print()methods forKnowledgeandDiscoobjects now give a more concise and readable summary.Discoobjects now store an attributegraph_classof the actual learned graph class.Knowledgeobjects generated fromknowledge()now verifies the knowledge for requires edges doesn’t contain a directed cycle.Improved the documentation.
Reduced the number of package dependencies.
causalDisco 1.1.0
CRAN release: 2026-04-13
New features
Exports
list_registered_tetrad_algorithms()to view the custom registered Tetrad algorithms.Allows the user to specify custom conditional independence tests for use with the engines bnlearn, causalDisco, and pcalg. The custom test should have the signature
function(x, y, conditioning_set, suff_stat)(optionally with an additionalargsargument for additional parameters), and return a p-value. See the documentation and the associated vignette for details.Added support for micd tests such as
micd::gaussCItestMI()for pcalg and causalDisco engine. See all the new available tests in?PcalgSearchand?CausalDiscoSearchunder the test field.Simplified the interface for extending causalDisco with new algorithms. Exports
make_method()andmake_runner()to do this. Please see the documentation and the associated vignette for details.
Improvements
Improved speed of
tfci(),tges(), andtpc()algorithms by at least 3x, and often much more.Updated
knowledge_to_caugi()to include information about required and forbidden edges in the output.Improve documentation for many functions.
causalDisco 1.0.1
CRAN release: 2026-02-24
This release should be considered essentially a new package with many new features, and some breaking changes (mainly renaming functions, arguments, and object classes) to be consistent.
Please see the vignettes and documentation for details on using the new features.
causalDisco 0.9.5
CRAN release: 2026-01-20
- Fixed warnings and notes from R CMD check regarding documentation.
causalDisco 0.9.3
- Changed structure of tpdag and tskeleton objects so they include tamat objects rather than amat and order slots. This is a major change, not backwards compatible!
- tpc now passes … argument to skeleton() function call
- Added functionality in tpc to handle missing information when using built-in tests. Three options are now available: complete case analysis, test wise deletion, or no handling (i.e., and error is thrown if there are NAs, this is the default and it is backwards compatible).
causalDisco 0.9.2
- Fixed bug in maketikz() function so it now works with tpdag and tamat objects, and added examples to the documentation.
