Learn R Programming

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

Epi (version 1.0.5)

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.5

License

GPL (>= 2)

Maintainer

Bendix Carstensen

Last Published

October 7th, 2025

Functions in Epi (1.0.5)

S.typh

Salmonella Typhimurium outbreak 1996 in Denmark.
Lexis.lines

Draw life lines in a Lexis diagram.
ftrend

Fit a floating trend to a factor in generalized linear model
contr.cum

Contrast matrices
ci.pd

Compute confidence limits for a difference of two independent proportions.
expand.data

Function to expand data for regression analysis of interval censored data.
pctab

Create percentages in a table
ROC

Function to compute and draw ROC-curves.
ci.cum

Compute cumulative sum of estimates.
ccwc

Generate a nested case-control study
W.Lexis

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

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

Projection of a model matrix on to the orthogonal complement of a trend.
subset.Lexis

Subsetting Lexis objects
effx

Function to calculate effects
Icens

Fits a regression model to interval censored data.
brv

Bereavement in an elderly cohort
tab

Tabulate transitions and risk time from a Lexis object
cutLexis

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

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

Merge a Lexis object with a data frame
float

Calculate floated variances
timeBand

Extract time band data from a split Lexis object
plot.Lexis

Lexis diagrams
gmortDK

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

Plot estimates with confidence limits
Lexis

Create a Lexis object
twoby2

Analysis of a two by two table
Life.lines

Compute dates/ages for life lines in a Lexis diagram
rateplot

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

A Cohort of Nickel Smelters in South Wales
splitLexis

Split follow-up time in a Lexis object
DMconv

Conversion to diabetes
mortDK

Population mortality rates for Denmark in 1-year age-classes.
stat.table

Tables of summary statistics
ewrates

Rates of lung and nasal cancer mortality, and total mortality.
fit.mult

Fits a multiplicative relative risk model to interval censored data.
apc.frame

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

Births in a London Hospital
timeScales

The time scales of a Lexis object
projection.ip

Projection of columns of a matrix.
hivDK

hivDK: seroconversion in a cohort of Danish men
blcaIT

Bladder cancer mortality in Italian males
Relevel

Reorder and combine levels of a factor
bdendo

A case-control study of endometrial cancer
ncut

Function to group a variable in intervals.
start.Lexis

Time series methods for Lexis objects
lep

An unmatched case-control study of leprosy incidence
diet

Diet and heart data
fit.baseline

Fit a piecewise contsnt intesity model for interval censored data.
effx.match

Function to calculate effects for individually matched case-control studies
fit.add

Fit an addive excess risk model to interval censored data.
apc.lines

Plot APC-estimates in an APC-frame.
nice

Nice breakpoints
Lexis.diagram

Plot a Lexis diagram
mh

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

Graphical display of a 2-way contingency table
cal.yr

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

Plot Equivalence Classes
lungDK

Male lung cancer incidence in Denmark
merge.data.frame

Merge data frame with a Lexis object
stattable.funs

Special functions for use in stat.table
bdendo11

A 1:1 subset of the endometrial cancer case-control study
thoro

Thorotrast Study
ci.lin

Compute linear functions of parameters with s.e.