Learn R Programming

Epi (version 2.19)

DMepi: Epidmiological rates for diabetes in Denmark 1996--2015

Description

Register based counts and person-uears for incidece of diabetes and mortality with and without diabetes.

Usage

data("DMepi")

Arguments

Format

A data frame with 4000 observations on the following 8 variables.

sex

a factor with levels M F

A

Age glass 0 -- 99

P

Calendar year, 1996-2015

X

Number of new diagnoses of diabetes

D.nD

Number of deaths among persons without diabetes

Y.nD

Person-years among persons without diabetes

D.DM

Number of deaths among persons with diabetes

Y.DM

Person-years among persons with diabetes

Details

Based on registers of the Danish population. Only included for illustrative purposes. Cannot be used as scientifically validaed data.

Examples

Run this code
# NOT RUN {
data(DMepi)
# Total deaths and person-years in the Danish population
ftable( addmargins( xtabs( cbind( Deaths=D.nD+D.DM,
                                    PYrs=Y.nD+Y.DM ) ~ P + sex,
                           data=DMepi ),
                    2 ),
        row.vars = 1 )
# Deaths and person-years in the population of diabetes patients
round(
ftable( addmargins( xtabs( cbind( Deaths=D.DM,
                                    PYrs=Y.DM ) ~ P + sex,
                           data=DMepi ),
                    2 ),
        row.vars = 1 ) )
# }

Run the code above in your browser using DataLab