resample_edge_weights: Resample network edge weights

View source: R/utils.R

resample_edge_weightsR Documentation

Resample network edge weights

Description

Takes a graph and modifies edge weights.

Usage

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(s)

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)

kpj/dce documentation built on Oct. 29, 2022, 1:40 a.m.