Learn R Programming

⚠️There's a newer version (2.61) of this package.Take me there.

Epi (version 1.0.7)

A package for statistical analysis in epidemiology.

Description

Functions for demographic and epidemiological analysis in the Lexis diagram, i.e. register and cohort follow-up data, including interval censored data and representation of multistate data. Also some useful functions for tabulation and plotting. Contains some epidemiological datasets.

Copy Link

Version

Install

install.packages('Epi')

Monthly Downloads

13,905

Version

1.0.7

License

GPL (>= 2)

Maintainer

Bendix Carstensen

Last Published

October 7th, 2025

Functions in Epi (1.0.7)

ROC

Function to compute and draw ROC-curves.
effx.match

Function to calculate effects for individually matched case-control studies
DMconv

Conversion to diabetes
cutLexis

Cut follow-up at a specified date for each person.
ccwc

Generate a nested case-control study
Life.lines

Compute dates/ages for life lines in a Lexis diagram
S.typh

Salmonella Typhimurium outbreak 1996 in Denmark.
fit.baseline

Fit a piecewise contsnt intesity model for interval censored data.
bdendo

A case-control study of endometrial cancer
Lexis.lines

Draw life lines in a Lexis diagram.
Lexis.diagram

Plot a Lexis diagram
brv

Bereavement in an elderly cohort
fit.mult

Fits a multiplicative relative risk model to interval censored data.
Icens

Fits a regression model to interval censored data.
ewrates

Rates of lung and nasal cancer mortality, and total mortality.
bdendo11

A 1:1 subset of the endometrial cancer case-control study
contr.cum

Contrast matrices
cal.yr

Functions to convert character, factor and various date objects into a number, and vice versa.
ci.lin

Compute linear functions of parameters with s.e.
detrend

Projection of a model matrix on to the orthogonal complement of a trend.
ci.cum

Compute cumulative sum of estimates.
ci.pd

Compute confidence limits for a difference of two independent proportions.
apc.frame

Produce an empty frame for display of parameter-estimates from Age-Period-Cohort-models.
apc.fit

Fit an Age-Period-Cohort model to tabular data.
Lexis

Create a Lexis object
births

Births in a London Hospital
merge.Lexis

Merge a Lexis object with a data frame
fit.add

Fit an addive excess risk model to interval censored data.
gmortDK

Population mortality rates for Denmark in 5-years age groups.
diet

Diet and heart data
lungDK

Male lung cancer incidence in Denmark
hivDK

hivDK: seroconversion in a cohort of Danish men
tab

Tabulate transitions and risk time from a Lexis object
plot.Lexis

Lexis diagrams
thoro

Thorotrast Study
subset.Lexis

Subsetting Lexis objects
tabplot

Graphical display of a 2-way contingency table
nice

Nice breakpoints
plotevent

Plot Equivalence Classes
projection.ip

Projection of columns of a matrix.
merge.data.frame

Merge data frame with a Lexis object
stat.table

Tables of summary statistics
timeBand

Extract time band data from a split Lexis object
ncut

Function to group a variable in intervals.
twoby2

Analysis of a two by two table
timeScales

The time scales of a Lexis object
ftrend

Fit a floating trend to a factor in generalized linear model
rateplot

Functions to plot rates from a table classified by age and calendar time (period)
stattable.funs

Special functions for use in stat.table
float

Calculate floated variances
Relevel

Reorder and combine levels of a factor
lep

An unmatched case-control study of leprosy incidence
nickel

A Cohort of Nickel Smelters in South Wales
splitLexis

Split follow-up time in a Lexis object
mortDK

Population mortality rates for Denmark in 1-year age-classes.
start.Lexis

Time series methods for Lexis objects
plotEst

Plot estimates with confidence limits
mh

Mantel-Haenszel analyses of cohort and case-control studies
effx

Function to calculate effects
W.Lexis

Split follow-up time in cohort studies.
apc.lines

Plot APC-estimates in an APC-frame.
apc.plot

Plot the estimates from a fitted Age-Period-Cohort model
blcaIT

Bladder cancer mortality in Italian males
expand.data

Function to expand data for regression analysis of interval censored data.
transform.Lexis

Transform a Lexis objects
pctab

Create percentages in a table