excess_plot: Plot results from fitted excess count model

Description Usage Arguments Value Examples

View source: R/excess_plot.R

Description

Plot results from fitted excess count model

Usage

1
excess_plot(fit, title = "", ylim = NULL, show.data = TRUE, alpha = 0.05)

Arguments

fit

The output from 'excess_model'

title

A title to add to plot

ylim

A vector with two numbers that determines the kimits for the y-axis

show.data

A logical that determines if the observed percent changes are shown

alpha

1 - 'alpha' confidence intervals are shown

Value

An ggplot object containing the plot.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
data(new_jersey_counts)
exclude_dates <- as.Date("2012-10-29") + 0:180
control_dates <- seq(min(new_jersey_counts$date), min(exclude_dates) - 1, by = "day")
f <- excess_model(new_jersey_counts,
start = as.Date("2012-09-01"), 
end = as.Date("2013-09-01"), 
exclude = exclude_dates,
model = "correlated",
weekday.effect = TRUE,
control.dates = control_dates)

library(ggplot2)
excess_plot(f)

excessmort documentation built on Oct. 11, 2021, 9:06 a.m.