Perform causal discovery using a particular method. For more information see 'Details'.

causal_discovery(
  dat,
  method = c("ease", "ica_lingam", "direct_lingam", "pc", "pc_rank", "random"),
  set_args = list()
)

Arguments

dat

Numeric matrix. Dataset matrix with n rows (observations) and p columns (variables).

method

String. Is one of:

set_args

List containing the named arguments to be passed to the respective method's function. If an argument is missing, then it is set to its default value. If set_args is not specified, or if it is passed as an empty list, then all arguments of the underlying method are set to their default values.

Value

List. The list is made of:

  • est_g --- Square binary matrix (or NA in case of error). The estimated DAG (or CPDAG when the method is pc or pc_rank).

  • est_cpdag --- Square binary matrix (or NA in case of error). The estimated CPDAG.

Details

This method is a wrapper around the individual causal search functions. For each causal method, it returns a list that can be passed directly to the function causal_metrics for evaluation. In particular, the first element of the returned list is a DAG (or CPDAG) and it is used to compute the structural intervention distance (see compute_str_int_distance). The second element of the list is a CPDAG and it is used to compute the structural Hamming distance (see compute_str_ham_distance).