I am working with the BAPC package in R to performing cancer incidence rates and cases projections. This is a special wrapper over the inla package used to create Bayesian age-period-cohort estimates. I can get the standard results just fine, but would like to perform two types of aggregates and have the appropriate uncertainty estimates. Here is some working code similar to what I have:
library(BAPC) data("FemLCSweden") data("FemPYSweden") data("whostandard") lc_sweden <- APCList(FemLCSweden, FemPYSweden, gf=5) result <- BAPC(lc_sweden, predict=list(npredict=3, retro=TRUE), secondDiff=FALSE, stdweight=whostandard[6:17,2], verbose=FALSE) From this, I can access the age-standardized rates for all years (including the last three, which were projected by the model) by using asr = agestd.rate(result). What I would like to do is aggregate the three projected years of data (in this case, 2008-2010) to get an 3-year average age-standardized rate for 2008-2010. I can perform the point estimate, but I am unsure how to access the necessary parts from the model to make correct credible intervals. The model components from inla can be accessed using res = inlares(result).
Similarly, I can get age-specific case projections for each year using cases = as.data.frame(agespec.proj(result), however I would also like to get total case projections for 2008, 2009, and 2010 with appropriate credible intervals. Again, I can make the point estimate just fine, but it's the uncertainty portion that I'm struggling with.
Thanks.