% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/causal_inference_functions.R
\name{causal_metrics}
\alias{causal_metrics}
\title{Causal evaluation metrics}
\usage{
causal_metrics(simulated_data, estimated_graphs)
}
\arguments{
\item{simulated_data}{List returned by \code{\link{simulate_data}}.
The list is made of:
\itemize{
\item \code{dataset} --- Numeric matrix. Dataset of simulated data with
\code{n} rows and \code{p} columns (note that the hidden variables are not
included in this matrix).
\item \code{dag} --- Square binary matrix. The generated DAG, including
both the observed variables and the confounders,
if the argument \code{has_confounder = TRUE} when calling
\code{\link{simulate_data}}.
\item \code{pos_confounders} --- Integer vector. Represents the position
of confounders (rows and columns) in \code{dag}.
If the argument \code{has_confounder = FALSE} when calling
\code{\link{simulate_data}}, then \code{pos_confounders = integer(0)}.
}}

\item{estimated_graphs}{List returned by \code{\link{causal_discovery}}.
The list is made of:
\itemize{
\item \code{est_g} --- Square binary matrix
(or \code{NA} in case of error).
The estimated DAG (or CPDAG when the method is \code{pc} or
\code{pc_rank}).
\item \code{est_cpdag} --- Square binary matrix
(or \code{NA} in case of error).
The estimated CPDAG.
}}
}
\value{
List. The list is made of:
\itemize{
\item \code{sid} Numeric --- between 0 and 1 --- (or \code{NA} if
\code{est_g} is \code{NA}). The structural intervention distance between
the true DAG \code{dag} and the estimated DAG (or CPDAG) \code{est_g}.
See also \code{\link{compute_str_int_distance}}.
\item \code{shd} Numeric --- between 0 and 1 --- (or \code{NA} if
\code{est_cpdag} is \code{NA}). The structural Hamming distance
between the true CPDAG (\code{dag_to_cpdag(dag)})
and the estimated CPDAG \code{est_cpdag}.
See also \code{\link{compute_str_ham_distance}}.
}
}
\description{
Evaluate the output of the causal inference method called by
\code{\link{causal_discovery}}.
}
\details{
The evaluation is done with respect to
the structural intervention
distance (see \code{\link{compute_str_int_distance}}).
and the
structural Hamming distance (see \code{\link{compute_str_ham_distance}}).
}
