sim_B: Simulates a graph

Description Usage Arguments Details Value Examples

Description

This is an internal simulation function. It creates a graph with regression coefficients.

Usage

1
sim_B(p, graph_setting, l, u, unique_ordering = TRUE)

Arguments

p

number of variables to simulate

graph_setting

either "dense", "sparse", "A", or "B". These settings correspons to the settings described in the article.

l

lower bound for direct abolute causal effect

u

upper bound for direct absolute causal effect

unique_ordering

if TRUE the simulated graph will have a unique topological ordering

Details

The sim_B function simulates a causal graph with regression coefficients. The graph is stored as matrix, where the (i,j)th entry in the matrix is non zero only if there is an arrow from j to i in the graph. The value in the (i,j)th entry corresponds to the direct causal effect from j to i.

Value

Returns a matrix of size p times p encoding a graph with regression coefficients.

Examples

1
2
3
sim_B(5, "dense", 0.3, 1)

sim_B(5, "sparse", 0.7, 1, uniqe_ordering = FALSE)

Laksafoss/CausDiscEqVar documentation built on May 23, 2019, 1:58 a.m.