dataCreate: Creating data

Description Usage Arguments Value Examples

Description

This function does the same as simulGBN and dataFormat combined.

Usage

1
dataCreate(nbData, p, KO = list(), nbKO = c(), W = 1 * upper.tri(matrix(0, p, p)), m, sigma, seed)

Arguments

nbData

integer - Number of observational replicats.

p

integer - Number of nodes in the network.

KO

list of vectors - Indicates on which nodes there is an intervention.

nbKO

vector of integer - Number of replicat for each KO.

W

matrix - Matrix of direct causal effects of the graph.

m

vector - Mean of the law that generate thes data.

sigma

vector - Variance of the law that generates the data

seed

integer -

Value

The function returns a list :

data

data that can be used by the main functions of this package.

X

Simulated values of the GBNetwork nodes.

W

Matrix of direct causal effects of the GBNetwork

intnode

matrix - 0 indicates that there is no intervention on the node. 1 indicates that the node is knock-out.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
seed = 1990
p <- 10
m<-rep(0,10)
sigma<-rep(0.1,10) 

W <- 1*upper.tri(matrix(0,p,p))

# Simple knock-out on two nodes

dataCreate(nbData = 2*p, p = 10,KO = list(1,9), nbKO = c(p,p), W = W , m = m,sigma = sigma, seed = seed)

# Multiple knock-out on 2 nodes

dataCreate(nbData = 2*p, p = 10,KO = list(c(6,10)), nbKO = c(p), W = W , m = m,sigma = sigma, seed = seed)

andreamrau/GBNcausal documentation built on May 12, 2019, 3:34 a.m.