plot.incdiag: Visualise disease incidence.

Description Usage Arguments Details Value Examples

View source: R/incidence.R

Description

Plots a comparison between the smoothed daily incidence function and actual incidence.

Usage

1
2
## S3 method for class 'incdiag'
plot(x, level = 0.95, ...)

Arguments

x

An incidence object.

level

The desired confidence interval width.

...

Arguments passed to plot.

Details

This function generates a plot from the cumulative incidence object. The incidence rate per year of the registry is shown in red. Mean incidence rate is shown as a solid blue line, with the confidence interval shown in dashed blue lines. The smooth fitted to the cumulative incidence data is shown in green.

Value

An object of class ggplot.

Examples

1
2
3
4
5
6
7
8
9
data(prevsim)

## Not run: 
inc <- test_homogeneity(prevsim$entrydate, population_size=1e6,
                        start = "2004-01-30", num_reg_years = 9)

plot(inc)

## End(Not run)

stulacy/rprev-dev documentation built on May 7, 2021, 4:17 a.m.