Learn R Programming

bamp (version 2.1.3)

plot.apc: Plot apc object

Description

Plot apc object

Usage

# S3 method for apc
plot(x, quantiles = c(0.05, 0.5, 0.95), ...)

Value

plot

Arguments

x

apc object

quantiles

quantiles to plot. Default: c(0.05,0.5,0.95) is median and 90% credible interval.

...

Additional arguments will be ignored

Details

Plot of age, period and cohort effects from apc objects. If covariates have been used for period/cohort, a second plot with covariate, absolute effect and relative effect is created. Absolute effect is relative effect times covariate.

Examples

Run this code
if (FALSE) {
data(apc)
model <- bamp(cases, population, age="rw1", period="rw1", cohort="rw1", periods_per_agegroup = 5)
plot(model)
}

Run the code above in your browser using DataLab