plot_mcmctraces: Trace plot for inhibMCMC posterior traces.

Description Usage Arguments Details Value Note Author(s) See Also Examples

Description

Plots the traces of posterior probabilities during an inhibMCMC run.

Usage

1
plot_mcmctraces(ret, thin = 1)

Arguments

ret

List. Object returned by ddepn call, using argument inference="mcmc" for inhibMCMC sampling.

thin

The thinning interval between consecutive observations.

Details

Plot the MCMC posterior traces of all runs during inhibMCMC inference. Uses a thinning interval defined in thin.

Value

none

Note

Uses the coda package and its mcmc object and plot functions.

Author(s)

Christian Bender

See Also

ddepn

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
30
31
## Not run: 
## load package
library(ddepn)
library(multicore)
library(coda)

## 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_mcmctraces(ret,thin=1)
plot_mcmctraces(ret,thin=10)


## End(Not run)

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