plot.eiwild: Plot diagnostics for an eiwild Object

Description Usage Arguments Details See Also Examples

View source: R/plot.eiwild.R

Description

plot diagnostics for an eiwild Object containing autocorrelation plots, density plots and trace using functions of coda package

Usage

1
2
3
## S3 method for class 'eiwild'
plot(x, whichPlot = NULL, whichParam = "cellCounts",
  whichCell = NULL, layout = TRUE, ...)

Arguments

x

an object of class eiwild

whichPlot

which type of plot. see Details for more information

whichParam

which parameter should be plotted "alphaDraws" or "cellCounts"

whichCell

which cell to plot

layout

logical if automatic layout of plot should be made with help of par=mfrow()

...

further graphical parameters given to correspondent coda function

Details

plot.eiwild uses the plot diagnostic functions of the coda package. The default is NULL which passes arguments to plot.mcmc:

See Also

plot.mcmc mcmc

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
32
33
34
35
## Not run: 
# loading some fake election data
data(topleveldat)
form <- cbind(CSU_2, SPD_2, LINK_2, GRUN_2) ~ cbind(CSU_1, SPD_1, Link_1)
set.seed(1234)
res <- indAggEi(form=form, aggr=aggr, indi=indi, IDCols=c("ID","ID"),
                sample=1000, thinning=2, burnin=100,verbose=100)

plot(res, whichPlot=1)
plot(res, whichPlot=2)
plot(res, whichPlot=3)
plot(res, whichPlot=4)

plot(res, whichPlot=1, whichCell=c(1,4,5))
plot(res, whichPlot=2, whichCell=c(1,4,5))
plot(res, whichPlot=3, whichCell=c(1,4,5))
plot(res, whichPlot=4, whichCell=c(1,4,5))

plot(res, whichPlot=1, whichCell=c(1))
plot(res, whichPlot=2, whichCell=c(1))
plot(res, whichPlot=3, whichCell=c(1))
plot(res, whichPlot=4, whichCell=c(1))

plot(res, whichPlot=1, whichParam="alphaDraws")
plot(res, whichPlot=2, whichParam="alphaDraws")
plot(res, whichPlot=3, whichParam="alphaDraws")
plot(res, whichPlot=4, whichParam="alphaDraws")

par(mfrow=c(2,2))
plot(res, whichPlot=1, whichCell=1, layout=FALSE)
plot(res, whichPlot=2, whichCell=1, layout=FALSE)
plot(res, whichPlot=3, whichCell=1, layout=FALSE)
plot(res, whichPlot=4, whichCell=1, layout=FALSE)

## End(Not run)

eiwild documentation built on May 31, 2017, 4:53 a.m.

Search within the eiwild package
Search all R packages, documentation and source code