ratesByAge: Function to plot age-specific incidence or mortality rates...

View source: R/ratesByAge.r

ratesByAgeR Documentation

Function to plot age-specific incidence or mortality rates along time

Description

This function is based on the rateplot function of the Epi package. It uses a APCList object and plots age-specific rates against period.

Usage

ratesByAge(APCList, age, per, scale=10^3, log.ax = "", ann = TRUE, grid = TRUE, ...)

Arguments

APCList

A APCList object

scale

Defining the scale of the rates.

age

Numerical vector giving the means of the age-classes.

per

Numerical vector giving the means of the periods.

log.ax

Character where '"y"' and '"r"' both refer to the rate scale. Defaults to '""'.

ann

Should the curves be annotated? Default: TRUE.

grid

Logical indicating whether a background grid should be drawn. Default: TRUE.

...

Additional arguments pssed on to 'rateplot'.

Details

Zero values of the rates are ignored. They are not shown in the plot.

Value

'NULL'. The function is used for its side-effect, the plot.

Author(s)

Andrea Riebler

References

Bendix Carstensen, Martyn Plummer, Esa Laara, Michael Hills (2012). Epi: A Package for Statistical Analysis in Epidemiology. R package version 1.1.40. URL http://CRAN.R-project.org/package=Ep

See Also

rateplot

Examples

   data(FemLCSweden)
   data(FemPYSweden)

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

   ratesByAge(lc_sweden, 10^3, age=seq(27,82,by=5), per=1951:2010, col=topo.colors(nage(lc_sweden)))

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

Related to ratesByAge in BAPC...