Print and plot methods for stand_surveil (standardized rates obtained from a fitted surveil model)

# S3 method for stand_surveil
print(x, scale = 1, digits = 3, ...)

# S3 method for stand_surveil
plot(
  x,
  scale = 1,
  style = c("mean_qi", "lines"),
  M = 250,
  base_size = 14,
  col = "black",
  fill = "gray80",
  alpha,
  lwd,
  ...
)

Arguments

x

An object of stand_surveil obtained by calling standardize on a fitted surveil model

scale

Scale the rates by this amount; e.g., scale = 100e3 will print rates per 100,000 at risk.

digits

Number of digits to print

...

additional arguments

style

If style = "mean_qi", then the posterior means and 95 percent credible intervals will be plotted; if style = "lines", then M samples from the joint posterior distribution will be plotted.

M

Number of samples to plot when style = "lines"

base_size

Passed to theme_classic() to control size of plot components (text).

col

Line color

fill

Fill color for the 95 percent credible intervals

alpha

For style = "mean_qi", this controls the transparency for the credible interval (passed to geom_ribbon) and defaults to alpha = 0.5; for style = "lines", this controls the transparency of the lines and defaults to alpha = 0.7.

lwd

Line width; for style = "mean_qi", the default is lwd = 1; for style = "lines", the default is lwd = 0.05.

Value

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

plot.stand_surveil

The plot method returns an object of class ggplot.

Details

Calling standardize on a fitted surveil model will create a new object that contains the surveil model results as well standardized rates. This new stand_surveil object has its own methods for printing and plotting.

Any additional arguments (...) will be passed to print.data.frame

plot.stand_surveil

Any additional arguments (...) will be passed to `theme.

See also