comPlot {eiwild} | R Documentation |
This function uses plot diagnostics (see
plot.eiwild
) to compare different
eiwild objects using functions of coda package
comPlot(eiList, whichCell, whichPlot, whichParam = "cellCounts", rollLim = NULL, rollCol = NULL, ...)
eiList |
list of |
whichCell |
which cell to plot |
whichPlot |
which type of plot. see Details for more information |
whichParam |
which parameter should be plotted
|
rollLim |
specifying other |
rollCol |
specifying other |
... |
arguments given to corresponding coda function |
whichPlot
controls the plot diagnostic to run:
1
passes arguments to
traceplot
2
passes
arguments to densityplot
3
calculates Running Mean with
eiwild:::rollMean
4
passes arguments to
gelman.plot
. Output of
gelman.diag
will be title of this plot.
## 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)