Learn R Programming

meta4diag (version 2.1.1)

plot: 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 meta4diag
plot(x, var.type="var1", add=FALSE, overlay.prior = TRUE, 
      save = FALSE, width=5, height=5, ...)

Arguments

x

A meta4diag object.

var.type

Variable type that is of interest. Options are "var1", "var2", "rho" and names for fixed effects, which can be found after calling summary() function.

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. save="plot1.eps", a file with name plot1 and eps format will be saved in the working directory.

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".

Value

Besides plotting, the function returns an invisible NULL.

Details

Posterior marginal distribution possibly with underlying prior distribution is plotted.

See Also

meta4diag

Examples

Run this code
# NOT RUN {
if(requireNamespace("INLA", quietly = TRUE)){
  require("INLA", quietly = TRUE)
  data(Catheter)
  res <- meta4diag(data = Catheter)
  plot(res, var.type="var1")
}
# }

Run the code above in your browser using DataLab