randDag: A function to generate a random DAG

Description Usage Arguments Value

View source: R/randDag.R

Description

This function randomly generate a DAG based on the specified structure details. Not all pairs of variables are connected in the resulting DAG, especially for small number of maxNPas.

Usage

1
randDag(nvars, maxNPas)

Arguments

nvars

The desired number of varaibles.

maxNPa

The desired maximum number of parents, with minimum 0 parent.

Value

The output of this function is a DAG in the bnlearn format.


kelvinyangli/mbmml documentation built on June 29, 2020, 3:12 a.m.