Learn R Programming

surveil (version 0.3.0)

apc: Annual and cumulative percent change

Description

Summarize annual and cumulative percent change in risk

Usage

apc(x)

# S3 method for surveil apc(x)

# S3 method for stand_surveil apc(x)

Value

An apc (list) object containing the following data frames:

apc

A data frame containing a summary of the posterior distribution for period-specific percent change. This contains the posterior mean (apc) 95 percent credible intervals (lwr and upr bounds).

cpc

A data frame containing a summary of the posterior distribution for the cumulative percent change in risk at each time period. This contains the posterior mean (cpc) and 95 percent credible interval (lwr and upr bounds).

apc_samples

MCMC samples from the posterior distribution for period percent change

cpc_samples

MCMC samples from the posterior distribution for cumulative percent change

Arguments

x

A fitted surviel model, or standardized rates (a stand_surveil object).

See Also

plot.apc print.apc stan_rw standardize

Examples

Run this code
data(cancer)
cancer2 <- subset(cancer, grepl("55|60|65|70", Age))
fit <- stan_rw(cancer2, time = Year, group = Age,
                iter = 900) # low iter for speed only
 x <- apc(fit)
 print(x)
 plot(x, cumulative = TRUE)

Run the code above in your browser using DataLab