Learn R Programming

eiwild (version 0.6.7)

plot.eiwild: Plot diagnostics for an eiwild Object

Description

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

Usage

"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

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)
# 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)

Run the code above in your browser using DataLab