plot.BayesMassBal {BayesMassBal} | R Documentation |
Plots BayesMassBal Object
Description
Visualizes data from a BayesMassBal
class object in a user specified way. Options include trace plots, posterior densities, and main effects plots. Meant to be a quick diagnostic tool, and not to produce publication quality plots.
Usage
## S3 method for class 'BayesMassBal'
plot(
x,
sample.params = NA,
layout = c("trace", "dens"),
hdi.params = c(1, 0.95),
ssEst.ylab = "Mass",
...
)
Arguments
x |
A |
sample.params |
List to be used for indicating model parameter samples used for creation of plot(s). See details for required structure. |
layout |
Character string indicating the desired data to be plotted. |
hdi.params |
Numeric vector of length two, used to draw Highest Posterior Density Intervals (HPDI) using |
ssEst.ylab |
Character string providing the label for the y-axis of a time series plot when object |
... |
Passes extra arguments to |
Details
The list of sample.params
requires a specific structure dependent on the choice of layout
and the desired plots.
If layout = "trace"
or layout = "dens"
, names(list)
must contain each model parameter desired for plotting. The structure under the model parameter names must be the same as to the structure of the relevant subset of the BayesMassBal
object to be used. For example, if a BayesMassBal
object is created using a process with sample components c("CuFeS2","gangue")
and the users wants plots of reconciled masses y_1
and y_2
for both components to be created, params = list(y.bal = list(CuFeS2 = c(1,2), gangue = c(1,2))
should be used. Note, str(params)
mimics str(x)
, while the vectors listed simply index the desired model parameters to be plotted.
See vignette("Two_Node_Process", package = "BayesMassBal")
for an example of the required structure.
Value
Plots BayesMassBal
object based on arguments passed to plot
.