Skip to contents

plot_apc() draws, for each cohort, the APC of every segment as a step over the years it covers, with its confidence interval as a shaded band and a zero reference line, so changes in trend read directly off the time axis. plot_aapc() draws a forest plot of AAPCs with confidence intervals by cohort and range.

Usage

plot_apc(object, model = "final", ncol = NULL, interactive = FALSE)

plot_aapc(object, model = "final", interactive = FALSE)

Arguments

object

A joinpoint object.

model

"final" or a number of joinpoints.

ncol

Number of facet columns.

interactive

Draw interactive ggiraph layers (tooltips and linked highlighting); show the result with jp_interactive().

Value

A ggplot object.

Examples

tb <- subset(us_mortality, cause == "Tuberculosis")
fit <- joinpoint(tb, year, rate, kmax = 2, ci_method = "parametric")
plot_apc(fit)

plot_aapc(fit)