calculateEdgeProbabilities: Calculate the edge probabilities.

Description Usage Arguments Value Author(s) See Also Examples

View source: R/calculateEdgeProbabilities.R

Description

This function calculates the marginal posterior probabilities of the edges in the network segments, for each timepoint, and optionally calculates the same for specified changepoints.

Usage

1
calculateEdgeProbabilities(network.samples, cps = NULL)

Arguments

network.samples

Network samples obtained from the MCMC simulation using EDISON.run and runDBN.

cps

Optionally specifies changepoints to allow for calculating the marginal posterior edge probabilities for specific segments.

Value

A list with elements:

probs.all

A list containing marginal edge posterior probabilities for each timepoint.

probs.segs

A list containing marginal edge posterior probabilities for each specified segment.

Author(s)

Frank Dondelinger

See Also

calculateEdgeProbabilitiesTimePoints,

calculateEdgeProbabilitiesSegs

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
# Generate random gene network and simulate data from it
dataset = simulateNetwork(l=25)

# Run MCMC simulation to infer networks and changepoint locations
result = EDISON.run(dataset$sim_data, num.iter=500)

# Calculate marginal posterior probabilities of edges in the network
network = calculateEdgeProbabilities(result)

# Calculate marginal posterior probabilities of edges in the network, 
# using the true changepoints
true.cps = c(2,dataset$epsilon)
network = calculateEdgeProbabilities(result, cps=true.cps)

EDISON documentation built on May 2, 2019, 2:39 a.m.