CausalImpactMethods: Printing and plotting a 'CausalImpact' object

CausalImpactMethodsR Documentation

Printing and plotting a CausalImpact object

Description

Methods for printing and plotting the results of an analysis results object returned by CausalImpact().

Usage

  ## S3 method for class 'CausalImpact'
summary(object, ...)
  ## S3 method for class 'CausalImpact'
print(x, ...)
  ## S3 method for class 'CausalImpact'
plot(x, ...)

Arguments

object

A CausalImpact results object, as returned by CausalImpact().

x

A CausalImpact results object, as returned by CausalImpact().

...

Optional additional arguments. For summary() and print(), the first optional argument is output, which can be "summary" (default) or "report". Partial matches are allowed. Furthermore, digits can be used to customize the precision of the output, e.g.: summary(..., "summary", digits = 3)

For plot(), the additional argument metrics can be used to specify which panels to include in the plot. The argument can be any combination of "original", "pointwise", "cumulative". Partial matches are allowed.

Author(s)

Kay H. Brodersen kbrodersen@google.com

Examples

## Not run: 
impact <- CausalImpact(...)

# Print a summary table
print(impact)
summary(impact)

# Print a verbal analysis description
print(impact, "report")
summary(impact, "report")

# Create a plot
plot(impact)
plot(impact, "original")
plot(impact, "pointwise")
plot(impact, "cumulative")
plot(impact, c("original", "pointwise"))

# Customize a plot
impact.plot <- plot(impact)
impact.plot <- impact.plot + theme_bw(base_size = 20)

## End(Not run)

CausalImpact documentation built on Nov. 10, 2022, 5:45 p.m.