CausalImpactMethods: Printing and plotting a 'CausalImpact' object

Description Usage Arguments Author(s) Examples

Description

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

Usage

1
2
3
4
5
6
  ## 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

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
## 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)

chenwendi/CausalImpactLite documentation built on May 13, 2019, 3:53 p.m.