Takes a graph and modifies edge weights.

resample_edge_weights(g, tp = 0.5, mineff = 1, maxeff = 2, method = "unif")

Arguments

g

original graph

tp

fraction of edge weights which will be modified

mineff

minimal differential effect size

maxeff

maximum effect effect size or standard deviation, if method is "gauss"

method

method for drawing the differential for the causal effects. Can be "unif", "exp" or "gauss".

Value

graph with new edge weights

Author

Martin Pirkl

Examples

graph.wt <- as(matrix(c(0,0,0,1,0,0,0,1,0), 3), "graphNEL")
graph.mt <- resample_edge_weights(graph.wt)