plot_edgeconfidences: Boxplots of edge confidences obtained in inhibMCMC.

Description Usage Arguments Details Value Author(s) Examples

Description

Plot the confidences for each edge, obtained from L independent MCMC chains.

Usage

1
2
3
4
plot_edgeconfidences(ret, start = 1, stop = NULL, act = "conf.act", 
					inh = "conf.inh", cex.axis = 1.5, ...)

make_edge_df(samp)

Arguments

ret

List. Either the returned object of the ddepn call using the inhibMCMC inference (argument inference="mcmc"), or the sublist samplings from this object.

start

Numeric. Optional, defines the start of the subset of the iterations in the MCMC chains which are used to generate the boxplots.

stop

Numeric. Optional, defines the end of the subset of the iterations in the MCMC chains which are used to generate the boxplots.

act

String. Defines the statistic to be used from the MCMC results. One of "conf.act" or "freqa", for activation confidence or frequency of activations.

inh

String. Defines the statistic to be used from the MCMC results. One of "conf.inh" or "freqi", for inhibition confidence or frequency of inhibitions.

samp

List. Contains the sampling runs from each MCMC chain. Note that the number of chains L:=length(samp).

cex.axis

Numeric. Scale factor for the axis labels.

...

Further plotting options passed to the lattice panel.bwplot function.

Details

Create a summary plot of edge confidences or counts over L MCMC runs. Assume that N is the number of nodes in the inferred network. Each panel in the summary plot contains N boxes showing the activation and N boxes showing the inhibition confidences/frequencies. Activation boxes are shown in blue, inhibition boxes in red. The column name in each panel defines the source node, from which an edge originates. The panel name denotes the destination node to which the edge points.

Value

none

Author(s)

Christian Bender

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
## Not run: 
## load package
library(ddepn)
library(multicore)

## sample a network and data
set.seed(1234)
n <- 6
signet <- signalnetwork(n=n, nstim=2, cstim=0, prop.inh=0.2)
phit <- signet$phi
stimuli <- signet$stimuli
dataset <- makedata(phit, stimuli, mu.bg=1200, sd.bg=400, mu.signal.a=2000, sd.signal.a=1000)

## use original network as prior matrix
## reset all entries for inhibiting edges 
## to -1
B <- phit
B[B==2] <- -1

## perform inhibMCMC inference, using 4 CPU cores to get 4 MCMC chains 
ret <- ddepn(dataset$datx, phiorig=phit, maxiterations=300, burnin=50,
            plotresults=FALSE, inference="mcmc",
            usebics=FALSE, priortype="laplaceinhib", lambda=0.01, B=B,
            multicores=TRUE, cores=4)

plot_edgeconfidences(ret, act="conf.act", inh="conf.inh",pch="|")


## End(Not run)

ddepn documentation built on May 2, 2019, 4:42 p.m.