plot {meta4diag} | R Documentation |
Default meta4diag plotting.
Description
Takes a meta4diag
object produced by meta4diag()
and plot the posterior marginals (possibly with underlying priors) for hyperparameters and fixed effects.
Usage
## S3 method for class 'meta4diag'
plot(x, var.type="var1", add=FALSE, overlay.prior = TRUE,
save = FALSE, width=5, height=5, ...)
Arguments
x |
A |
var.type |
Variable type that is of interest. Options are "var1", "var2", "rho" and names for fixed effects, which can be found after calling |
add |
If add is TRUE, the plots are added to an existing plot, otherwise a new plot is created. |
overlay.prior |
Boolean to indicate whether the prior will be plotted overlay or not only for hyperparameters. |
save |
If save is TRUE, the plots are saved (pdf format) automatically in the working directory. save could also be a file name, i.e. |
width |
The width when used for saving the plot, unit of inches is used. |
height |
The height when used for saving the plot, unit of inches is used. |
... |
Arguments to be passed to methods, such as graphical parameters (see par) such as "main", "sub", "xlab", "ylab". |
Details
Posterior marginal distribution possibly with underlying prior distribution is plotted.
Value
Besides plotting, the function returns an invisible NULL.
Author(s)
Jingyi Guo jingyi.guo@math.ntnu.no and Andrea Riebler andrea.riebler@math.ntnu.no
See Also
Examples
## Not run:
if(requireNamespace("INLA", quietly = TRUE)){
require("INLA", quietly = TRUE)
data(Catheter)
res <- meta4diag(data = Catheter)
plot(res, var.type="var1")
}
## End(Not run)