Summarize annual and cumulative percent change in risk

apc(x)

# S3 method for surveil
apc(x)

# S3 method for stand_surveil
apc(x)

Arguments

x

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

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

Examples

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)