DAG = create_empty_DAG(3)
DAG = bnlearn::set.arc(DAG, 'U1', 'U3')
DAG = bnlearn::set.arc(DAG, 'U2', 'U3')
order_hash = r2r::hashmap()
order_hash[['U3']] = c("U1", "U2")
is_cond_copula_specified(DAG = DAG, order_hash = order_hash,
w = "U1", v = "U3", cond = c())
# returns TRUE because the copula c_{1,3} is known
is_cond_copula_specified(DAG = DAG, order_hash = order_hash,
w = "U2", v = "U3", cond = c())
# returns FALSE because the copula c_{2,3} is not known
is_cond_copula_specified(DAG = DAG, order_hash = order_hash,
w = "U2", v = "U3", cond = c("U1"))
# returns TRUE because the copula c_{2,3 | 1} is known
Run the code above in your browser using DataLab