| ParDAG-class | R Documentation |
"ParDAG" of Parametric Causal ModelsThis virtual base class represents a parametric causal model.
The class "ParDAG" serves as a basis for simulating observational
and/or interventional data from causal models as well as for parameter
estimation (maximum-likelihood estimation) for a given causal model in the
presence of a data set with jointly observational and interventional data.
The virtual base class "ParDAG" provides a “skeleton” for all
functions relied to the aforementioned task. In practical cases, a user may
always choose an appropriate class derived from ParDAG which
represents a specific parametric model class. The base class itself does
not represent such a model class.
new("ParDAG", nodes, in.edges, params)
nodesVector of node names; cf. also field .nodes.
in.edgesA list of length p consisting of index
vectors indicating the edges pointing into the nodes of the DAG.
paramsA list of length p consisting of parameter
vectors modeling the conditional distribution of a node given its
parents; cf. also field .params.
.nodes:Vector of node names; defaults to as.character(1:p),
where p denotes the number of nodes (variables) of the model.
.in.edges:A list of length p consisting of index
vectors indicating the edges pointing into the nodes of the DAG.
.params:A list of length p consisting of parameter
vectors modeling the conditional distribution of a node given its
parents. The entries of the parameter vectors only get a concrete
meaning in derived classes belonging to specific parametric model classes.
node.count():Yields the number of nodes (variables) of the model.
simulate(n, target, int.level):Generates n
(observational or interventional) samples from the parametric causal
model. The intervention target to be used is specified by the parameter
target; if the target is empty (target = integer(0)),
observational samples are generated. int.level indicates
the values of the intervened variables; if it is a vector of the same
length as target, all samples are drawn from the same intervention
levels; if it is a matrix with n rows and as many columns as
target has entries, its rows are interpreted as individual
intervention levels for each sample.
edge.count():Yields the number of edges (arrows) in the DAG.
mle.fit(score):Fits the parameters using an appropriate
Score object.
signature(x = "ParDAG", y = "ANY"): plots the underlying
DAG of the causal model. Parameters are not visualized.
Alain Hauser (alain.hauser@bfh.ch)
GaussParDAG
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.