plot.amis: Plot histogram or credible interval of weighted distributions...

View source: R/AMIS_outputs.R

plot.amisR Documentation

Plot histogram or credible interval of weighted distributions given a model fitted by amis()

Description

Plot histogram or credible interval of weighted distributions given a model fitted by amis()

Usage

## S3 method for class 'amis'
plot(
  x,
  what = "prev",
  type = "hist",
  locations = 1,
  time = 1,
  measure_central = "mean",
  order_locations_by = NULL,
  display_location_names = FALSE,
  alpha = 0.05,
  breaks = 500,
  cex = 1,
  lwd = 1,
  xlim = NULL,
  main = NULL,
  xlab = NULL,
  ylab = NULL,
  ...
)

Arguments

x

The output from the function amis().

what

What posterior distribution should be plotted. It can be "prev" (default) for plotting prevalences, or one of the parameter names.

type

Type of plot. It can be "hist" (default) for histogram, or "CI" for credible intervals

locations

Integer vector or location names identifying locations the plots are made for. Default to 1 (first location).

time

Integer index identifying the timepoint. Default to 1.

measure_central

Measure of central tendency for credible interval plots. It can be "mean" (default) or "median".

order_locations_by

How the credible intervals of multiple locations should be ordered. If NULL (default), locations are displayed according to the argument "locations". Otherwise, it must be either "prev" or one of the parameter names, and then the locations are ranked by the corresponding measure of central tendency.

display_location_names

Logical indicating whether location names are to be shown or not in credible interval plots. Default to FALSE.

alpha

Numeric value between 0 and 1 indicating the endpoints of the credible intervals, which are evaluated at (alpha/2, 1-alpha/2)% quantiles. Default (0.05) will create 95% credible intervals.

breaks

Argument passed to wtd.hist() for histogram plots. Default to 500.

cex

Argument passed to plots of credible intervals. Default to 1.

lwd

Argument passed to plots of credible intervals. Default to 1.

xlim

The x limits of the plots. For for credible intervals of multiple statistics (i.e. length(what)>1), it must be either NULL or a list with the x limits for each statistic. Default to NULL.

main

Title for the plot.

xlab

Lable for the x axis.

ylab

Lable for the y axis.

...

Other graphical parameters passed to wtd.hist().

Details

For illustrative examples, see amis().

Value

A plot.


AMISforInfectiousDiseases documentation built on April 4, 2025, 1:45 a.m.