Learn R Programming

abn (version 2.1)

createDag: Create a letigimate DAGs

Description

Create a legitimate DAGs in the abn format.

Usage

create_abnDag( dag, data.df = NULL, data.dists = NULL, ...)

Arguments

dag

a matrix or a formula specifying a DAG, see ‘Details’.

data.df

named dataframe or named vector.

data.dists

named list giving the distribution for each node in the network. If not provided it will be sample and returned.

...

further arguments passed to or from other methods.

Value

An object of class abnDag containing a named matrix and a named list giving the distribution for each node.

Details

An object of class class(abn) contains a named matrix describing the DAG and possibly additional objects such as the associated distributions of the nodes.

If the dag is specified with a formula, either data.df or data.dists is required with the . quantifier.

Examples

Run this code
# NOT RUN {
create_abnDag( ~a+b|a, data.df=c("a"=1, "b"=1))
# }

Run the code above in your browser using DataLab