Methods for APC objects

# S3 method for apc
print(x, digits = 1, max = 20, ...)

# S3 method for apc
plot(
  x,
  cumulative = FALSE,
  style = c("mean_qi", "lines"),
  M = 250,
  col = "black",
  fill = "black",
  alpha,
  lwd,
  base_size = 14,
  ...
)

Arguments

x

An apc object returned by apc

digits

Print this many digits (passed to print.data.frame)

max

Maximum number of time periods (rows) to print

...

additional arguments; for the print argument, these will be passed to print.data.frame. For the plot method, these will be passed to theme.

cumulative

Plot cumulative percent change? Defaults to cumulative = FALSE

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 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 the 95 percent credible interval

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

base_size

Size of plot attributes, passed to `theme_classic

Value

print

The print method does not have a return value, but prints a summary of results to the R console.

Plot

The plot method returns a ggplot.

See also