plot.Rd 1.78 KB
Newer Older
Gilles Kratzer's avatar
Gilles Kratzer committed
1
2
3
4
5
6
7
8
% plot.mcmcabn.Rd ---
% Author           : Gilles Kratzer
% Created on :       18.02.2019
% Last modification :
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\name{plot.mcmcabn}
\alias{plot.mcmcabn}
Gilles Kratzer's avatar
typos    
Gilles Kratzer committed
9
\title{Function to plot mcmcabn class objects}
Gilles Kratzer's avatar
Gilles Kratzer committed
10
11
12
13
14
15
16
17
18
19

\usage{
\method{plot}{mcmcabn}(x,
     max.score = FALSE,
     \dots)
     }

\arguments{
  \item{x}{object of class mcmcabn.}
  \item{max.score}{logical to plot the cumulative maximum network score.}
Gilles Kratzer's avatar
typos    
Gilles Kratzer committed
20
  \item{\dots}{arguments to be passed to methods.}
Gilles Kratzer's avatar
Gilles Kratzer committed
21
22
  }

Gilles Kratzer's avatar
typos    
Gilles Kratzer committed
23
\description{Generic function to plot \code{mcmcabn} objects.
Gilles Kratzer's avatar
Gilles Kratzer committed
24
25
}

Gilles Kratzer's avatar
typos    
Gilles Kratzer committed
26
\details{The plot function for mcmcabn objects is based on \pkg{ggplot2}, \pkg{ggpubr} and \pkg{cowplot} packages. By default it returns a trace plot with coloured points when MBR and REV methods have been used. It displays histograms on the right of the densities of (MC)^3, MBR and REV MCMC jumps respectively.}
Gilles Kratzer's avatar
Gilles Kratzer committed
27
28
29
30

\author{Gilles Kratzer}

\references{
Gilles Kratzer's avatar
typos    
Gilles Kratzer committed
31
32

Plotting ability:
Gilles Kratzer's avatar
Gilles Kratzer committed
33
34
35
36
37
38
H. Wickham. ggplot2: Elegant Graphics for Data Analysis. Springer-Verlag New York, 2016.

Alboukadel Kassambara (2018). ggpubr: 'ggplot2' Based Publication Ready Plots. R package version 0.2. https://CRAN.R-project.org/package=ggpubr

Claus O. Wilke (2019). cowplot: Streamlined Plot Theme and Plot Annotations for 'ggplot2'. R package version 0.9.4. https://CRAN.R-project.org/package=cowplot

Gilles Kratzer's avatar
typos    
Gilles Kratzer committed
39
Data:
Reinhard Furrer's avatar
details    
Reinhard Furrer committed
40
Scutari, M. (2010). Learning Bayesian Networks with the bnlearn R Package. Journal of Statistical Software, 35(3), 1-22. doi:http://dx.doi.org/10.18637/jss.v035.i03.
Gilles Kratzer's avatar
Gilles Kratzer committed
41
42
}

Gilles Kratzer's avatar
Gilles Kratzer committed
43

Gilles Kratzer's avatar
Gilles Kratzer committed
44
\examples{
Reinhard Furrer's avatar
details    
Reinhard Furrer committed
45
46
## Example from the asia dataset from Lauritzen and Spiegelhalter (1988)
## provided by Scutari (2010)
Gilles Kratzer's avatar
Gilles Kratzer committed
47
48
data("mcmc_run_asia")

Reinhard Furrer's avatar
details    
Reinhard Furrer committed
49
# plot the mcmc run
Gilles Kratzer's avatar
Gilles Kratzer committed
50
plot(mcmc.out.asia)
51

Reinhard Furrer's avatar
details    
Reinhard Furrer committed
52
# plot cumulative max score
53
54
plot(mcmc.out.asia, max.score = TRUE)
}