Learn R Programming

rprev (version 0.2.3)

incidence_age_distribution: Plot the age distribution of incident cases.

Description

This function plots the age distribution of incident cases from the registry.

Usage

incidence_age_distribution(agedata, df = 10)

Arguments

agedata
Vector of ages at diagnosis for each patient in the registry.
df
Degrees of freedom for the smooth.

Value

Plot of the raw data and smoothed age distribution function.

See Also

Other incidence functions: incidence, mean_incidence_rate, plot.incidence, raw_incidence, test_incidence_fit, yearly_incidence

Examples

Run this code
data(prevsim)

incidence_age_distribution(prevsim$age)

incidence_age_distribution(prevsim$age, df=5)

Run the code above in your browser using DataLab