Methods for surveil_diff objects

print surveil_diff objects for analyses of inequality

# S3 method for surveil_diff
plot(
  x,
  style = c("mean_qi", "lines"),
  M = 250,
  col = "black",
  fill = "gray80",
  lwd,
  alpha,
  plot = TRUE,
  scale = 1e+05,
  PAR = TRUE,
  ncol = 3,
  base_size = 14,
  ...
)

# S3 method for surveil_diff
print(x, scale = 1, ...)

Arguments

x

Object of class surveil_diff, as returned by calling group_diff on a fitted surveil model

style

If style = "mean_qi", then the posterior mean and 95 percent credible interval will be plotted; if style = "lines", then M samples from the joint probability distribution of the annual rates will be plotted.

M

If style = "lines", then M is the number of samples from the posterior distribution that will be plotted; the default is M = 250.

col

Line color

fill

Fill color for credible intervals, passed to geom_ribbon

lwd

Linewidth

alpha

transparency; for style = "mean_qi", controls the credible interval shading; for style = "lines"`, this is applied to the lines

plot

If plot = FALSE, a list of ggplots will be returned

scale

Print rates and rate differences as per scale at risk, e.g., per 10,000 at risk.

PAR

Return population attributable risk? IF FALSE, then the rate ratio will be used instead of PAR.

ncol

Number of columns for the plotting device. If ncol = 1, the three plots will be aligned vertically in one column; if ncol = 3 they will b aligned horizontally in one row.

base_size

Passed to theme_classic to control size of plot elements (e.g., text)

...

additional print arguments

Value

plot.surveil_diff

By default or whenever plot = TRUE, the plot method draws a series of plots to the current plotting device using grid.arrange. If plot = FALSE, then a list of ggplots is returned.

The print method returns nothing and prints a summary of results to the console.