comPlot: Plot Diagnostics to compare eiwild objects

Description Usage Arguments Details See Also Examples

View source: R/comPlot.R

Description

This function uses plot diagnostics (see plot.eiwild) to compare different eiwild objects using functions of coda package

Usage

1
2
comPlot(eiList, whichCell, whichPlot, whichParam = "cellCounts",
  rollLim = NULL, rollCol = NULL, ...)

Arguments

eiList

list of eiwild objects

whichCell

which cell to plot

whichPlot

which type of plot. see Details for more information

whichParam

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

rollLim

specifying other ylim-values for rolling mean plot (Default=NULL)

rollCol

specifying other col-values for rolling mean plot (Default=NULL)

...

arguments given to corresponding coda function

Details

whichPlot controls the plot diagnostic to run:

See Also

mcmc plot.eiwild indAggEi

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: 
# 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)
out1 <- indAggEi(form=form, aggr=aggr, indi=indi, IDCols=c("ID","ID"),
                sample=1000, thinning=2, burnin=100, verbose=100)
out2 <- indAggEi(form=form, aggr=aggr, indi=indi, IDCols=c("ID","ID"),
                sample=1000, thinning=2, burnin=100, verbose=100)
out3 <- indAggEi(form=form, aggr=aggr, indi=indi, IDCols=c("ID","ID"),
                sample=1000, thinning=2, burnin=100, verbose=100)
out4 <- indAggEi(form=form, aggr=aggr, indi=indi, IDCols=c("ID","ID"),
                sample=1000, thinning=2, burnin=100, verbose=100)

eiList <- list(out1, out2, out3, out4)

comPlot(eiList, whichCell=1, whichPlot=1)
comPlot(eiList, whichCell="counts.CSU_1.CSU_2", whichPlot=1)
comPlot(eiList, whichCell=1, whichPlot=1, smooth=TRUE)

comPlot(eiList, whichCell=1, whichPlot=2)

comPlot(eiList, whichCell=1, whichPlot=3)

comPlot(eiList, whichCell=1, whichPlot=4)
comPlot(eiList, whichCell=1, whichPlot=4)
comPlot(eiList, 1, 3, whichParam="alphaDraws")

comPlot(eiList, "alpha.CSU_1.CSU_2", 3, whichParam="alphaDraws")

## End(Not run)

eiwild documentation built on May 29, 2017, 8:15 p.m.