qapc: Function to compute quantiles for age-specific (and...

View source: R/qapc.R

qapcR Documentation

Function to compute quantiles for age-specific (and age-standardized) rates or projections.

Description

Function to compute quantiles for age-specific (and age-standardized) rates or projections.

Usage

  qapc(APCList, percentiles=c(0.025, seq(0.05, 0.95, by=0.05), 0.975))

Arguments

APCList

APCList object generated by the BAPC function.

percentiles

Probabilities related to percentiles or prediction intervals which should be computed. These values must be between 0 and 1.

Value

An APCList object where the desired quantiles are added to agespec.rate(APCList), agespec.proj(APCList) and if available agestd.rate(APCList), agestd.proj(APCList). Note only quantiles that are not yet available will be added.

Author(s)

Andrea Riebler

Examples

## Not run: 
if(requireNamespace("INLA", quietly = TRUE)) {
    require(INLA)
    data(FemLCSweden)
    data(FemPYSweden)
    data(whostandard)

    lc_sweden <- APCList(FemLCSweden, FemPYSweden, gf=5)

    result <- BAPC(lc_sweden, predict=list(npredict=10, retro=TRUE),
        verbose=FALSE, stdweight=whostandard[6:17,2])

    result <- qapc(result)
    head(agespec.proj(result)[[1]])
}

## End(Not run)

BAPC documentation built on March 23, 2022, 3 p.m.

Related to qapc in BAPC...