Learn R Programming

eiwild (version 0.6.7)

comPlot: Plot Diagnostics to compare eiwild objects

Description

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

Usage

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

Run this code
## 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)

Run the code above in your browser using DataLab