plotABC_3D | R Documentation |
Plot posterior density distribution for each generation in 3d plot window
plotABC_3D(
particleDataFrame,
parameter,
show.particles = "none",
plot.parent = FALSE,
realParam = FALSE,
realParamValues = NA
)
particleDataFrame |
A |
parameter |
Column number of parameter of interest from
|
show.particles |
Option to show particles on 3d plot as "none" or as a function of "weights" or "distance". |
plot.parent |
Option to plot lines on the floor of the 3d plot to show particle parantage. |
realParam |
Option to display real parameter value as a solid line, also must give actual value for this (realParamValues). Note: this should only be done with simulated data where real param values are recorded. |
realParamValues |
Value for |
This opens a new interactive 3d plotting window and plots the posterior density distribution of accepted particles from each generation. Several options are available to add to the plot: plotting particles by weight or distance, plotting particle parantage, and plotting the real parameter values (if known).
As of version 0.6.0, rejected particles are not saved for outputting by the parallelized algorithm, and thus they are no longer displayed by this function, unlike previous versions.
This function requires access to the function triangulate
and the as
method for class gpc.poly
from package gpclib
.
As of 08-22-19, this package was not available from CRAN as a
Windows binary, and thus this function is likely
unavailable to many (if not all) Windows users.
This function also requires the package rgl
, which is usually easier to
obtain than package gpclib
, but may not be buildable on some UNIX workstations.
Barb Banbury
# need to check for required suggested packages
if(requireNamespace("gpclib", quietly = TRUE) & requireNamespace("rgl", quietly = TRUE)){
data(simRunExample)
plotABC_3D(
particleDataFrame = resultsBMExample[[1]]$particleDataFrame,
parameter = 7,
show.particles = "none",
plot.parent = FALSE,
realParam = FALSE,
realParamValues = NA
)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.