| Index | Topics |
| scm class {bnlearn} | R Documentation |
The scm class structure
Description
The structure of an object of S3 class scm.
Usage
as.scm(x, ...)
## S3 method for class 'bn'
as.scm(x, ...)
Arguments
x |
an object of class |
... |
additional arguments, currently ignored. |
Details
An object of class scm is a list containing at least the following components:
-
roles: a list with three named elements:-
factual: a vector of character strings, the labels of the factual nodes in the structural causal model. -
exogenous: a vector of character strings, the labels of the exogenous nodes in the structural causal model. -
counterfactual: a vector of character strings, the labels of the counterfactual nodes in the structural causal model. Unlike previous elements, it can be empty.
-
-
nodes: a list. Each element is named after a node and contains the following elements:-
counterfactual: a character string.-
For a factual node, it contains the label of the corresponding counterfactual node (if any).
-
For an exogenous node, it contains the label of the counterfactual node linked to it (if any).
-
For a counterfactual node, it is set to
character(0).
-
-
exogenous: a character string.-
For a factual or counterfactual node, it contains the label of the corresponding exogenous node (if any).
-
For an exogenous node, it is set to
character(0).
-
-
factual: a character string.-
For a counterfactual node, it contains the label of the corresponding factual node.
-
For an exogenous node, it contains the label of the factual node linked to it (if any).
-
For a factual node, it is set to
character(0).
-
-
parents: the parents of the node (a vector of character strings). Note that exogenous nodes are not listed among the parents of factual and counterfactual nodes. -
children: the children of the node (a vector of character strings). Note that factual and counterfactual nodes are not listed among the children of exogenous nodes.
-
-
arcs: the arcs of the structural causal model (a two-column matrix, whose columns are labeledfromandto), including the arcs between exogenous and factual/counterfactual nodes.
Author(s)
Marco Scutari
| Index | Topics |