Learn R Programming

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

Epi (version 2.19)

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, in particular representation, manipulation and simulation of multistate data - the Lexis suite of functions, which includes interfaces to 'mstate', 'etm' and 'cmprsk' packages. Also contains functions for Age-Period-Cohort and Lee-Carter modeling and a function for interval censored data and some useful functions for tabulation and plotting, as well as a number of epidemiological data sets.

Copy Link

Version

Install

install.packages('Epi')

Monthly Downloads

11,182

Version

2.19

License

GPL-2

Last Published

August 9th, 2017

Functions in Epi (2.19)

DMepi

Epidmiological rates for diabetes in Denmark 1996--2015
DMlate

The Danish National Diabetes Register.
Icens

Fits a regression model to interval censored data.
LCa.fit

Fit Lee-Carter-type models for rates to arbitrarily shaped observations of rates in a Lexis diagram.
B.dk

Births in Denmark by year and month of birth and sex
DMconv

Conversion to diabetes
Lexis

Create a Lexis object
Lexis.diagram

Plot a Lexis diagram
Lexis.lines

Draw life lines in a Lexis diagram.
Life.lines

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

Natural splines - (cubic splines linear beyond outermost knots) with convenient specification of knots and possibility of centering, detrending and clamping.
ROC

Function to compute and draw ROC-curves.
Relevel

Reorder and combine levels of a factor
S.typh

Salmonella Typhimurium outbreak 1996 in Denmark.
addCov.Lexis

Add covariates (typically clinical measurements) taken at known times to a Lexis object.
N2Y

Create risk time ("Person-Years") in Lexis triangles from population count data.
NArray

Set up an array of NAs, solely from the list of dimnames
births

Births in a London Hospital
bdendo11

A 1:1 subset of the endometrial cancer case-control study
cal.yr

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

Generate a nested case-control study
ewrates

Rates of lung and nasal cancer mortality, and total mortality.
expand.data

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

Create a data structures suitable for use with packages mstate, etm.
bdendo

A case-control study of endometrial cancer
ftrend

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

A small occupational cohort
pc.lines

Plot period and cohort effects in an APC-frame.
plot.apc

Plot the estimates from a fitted Age-Period-Cohort model
M.dk

Mortality in Denmark 1974 ff.
N.dk

Population size in Denmark
boxes.MS

Draw boxes and arrows for illustration of multistate models.
apc.LCa

Fit Age-Period-Cohort models and Lee-Carter models with effects modeled by natural splines.
ci.pd

Compute confidence limits for a difference of two independent proportions.
clogistic

Conditional logistic regression
fit.mult

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

Plotting Aalen-Johansen curves for competing events
testisDK

Testis cancer incidence in Denmark, 1943--1996
thoro

Thorotrast Study
brv

Bereavement in an elderly cohort
contr.cum

Contrast matrices
crr.Lexis

Fit a competing risks regression model (Fine-Gray model) using a Lexis object)
blcaIT

Bladder cancer mortality in Italian males
cutLexis

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

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

Diet and heart data
effx

Function to calculate effects
lgrep

Convenience versions of grep
apc.lines

Plot APC-estimates in an APC-frame.
float

Calculate floated variances
lls

Functions to manage and explore the workspace
lungDK

Male lung cancer incidence in Denmark
mcutLexis

Cut follow-up at multiple event dates and keep track of order of events
merge.Lexis

Merge a Lexis object with a data frame
plotEst

Plot estimates with confidence limits (forest plot)
mortDK

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

Function to group a variable in intervals.
cbind.Lexis

Combining a Lexis objects with data frames or other Lexis objects
effx.match

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

Compute survival functions from rates and expected residual lifetime in an illness-death model as well as years of life lost to disease.
gen.exp

Generate covariates for drug-exposure follow-up from drug purchase records.
gmortDK

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

Nice breakpoints
nickel

A Cohort of Nickel Smelters in South Wales
pctab

Create percentages in a table
plot.Lexis

Lexis diagrams
plotevent

Plot Equivalence Classes
subset.Lexis

Subsetting Lexis (and stacked.Lexis) objects
summary.Lexis

Summarize transitions and risk time from a Lexis object
timeBand

Extract time band data from a split Lexis object
rm.tr

Remove transitions from a Lexis object.
simLexis

Simulate a Lexis object representing follow-up in a multistate model.
splitLexis

Split follow-up time in a Lexis object
timeScales

The time scales of a Lexis object
Termplot

A wrapper for termplot that optionally (but by default) exponentiates terms, and plot them on a common log-scale. Also scales x-axes to the same physical scale.
Y.dk

Population risk time in Denmark
apc.fit

Fit an Age-Period-Cohort model to tabular data.
apc.frame

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

Tables of summary statistics
stattable.funs

Special functions for use in stat.table
ci.cum

Compute cumulative sum of estimates.
ci.lin

Compute linear functions of parameters with standard errors and confidence limits
fit.add

Fit an addive excess risk model to interval censored data.
fit.baseline

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

hivDK: seroconversion in a cohort of Danish men
lep

An unmatched case-control study of leprosy incidence
merge.data.frame

Merge data frame with a Lexis object
mh

Mantel-Haenszel analyses of cohort and case-control studies
projection.ip

Projection of columns of a matrix.
rateplot

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

Functions to facilitate analysis of multistate models.
start.Lexis

Time series methods for Lexis objects
transform.Lexis

Transform a Lexis (or stacked.Lexis) objects
twoby2

Analysis of a two by two table