Check whether any of the observable constraints implied by the causal model are violated for a given distribution of observables
Source:R/causal-model.R
check_constraints_violated.Rd
Check whether any of the observable constraints implied by the causal model are violated for a given distribution of observables
Value
Either TRUE (violated) or FALSE (not violated) with messages indicating what constraints are violated if any.
Examples
graph <- initialize_graph(graph_from_literal(Z -+ X, X -+ Y, Ur -+ X, Ur -+ Y))
iv_model <- create_causalmodel(graph, prob.form = list(out = c("X", "Y"), cond = "Z"))
check_constraints_violated(iv_model, probs = sample_distribution(iv_model))
#> Constraints not violated
#> [1] FALSE