Learn R Programming

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

Epi (version 2.0)

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 modeling and a function for interval censored data and some useful functions for tabulation and plotting, as well some epidemiological datasets.

Copy Link

Version

Install

install.packages('Epi')

Monthly Downloads

11,182

Version

2.0

License

GPL-2

Last Published

January 6th, 2016

Functions in Epi (2.0)

Life.lines

Compute dates/ages for life lines in a Lexis diagram
apc.fit

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

Fits a regression model to interval censored data.
effx

Function to calculate effects
S.typh

Salmonella Typhimurium outbreak 1996 in Denmark.
merge.data.frame

Merge data frame with a Lexis object
NArray

Set up an array of NAs, solely from the list of dimnames
apc.lines

Plot APC-estimates in an APC-frame.
Relevel

Reorder and combine levels of a factor
Lexis.diagram

Plot a Lexis diagram
Lexis

Create a Lexis object
blcaIT

Bladder cancer mortality in Italian males
ftrend

Fit a floating trend to a factor in generalized linear model
merge.Lexis

Merge a Lexis object with a data frame
apc.frame

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

Population size in Denmark
cal.yr

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

hivDK: seroconversion in a cohort of Danish men
N2Y

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

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

An unmatched case-control study of leprosy incidence
gen.exp

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

Births in Denmark by year and month of birth and sex
stack.Lexis

Functions to facilitate analysis of multistate models.
splitLexis

Split follow-up time in a Lexis object
ci.lin

Compute linear functions of parameters with standard errors and confidence limits
nice

Nice breakpoints
ccwc

Generate a nested case-control study
DMconv

Conversion to diabetes
lls

Functions to manage and explore the workspace
clogistic

Conditional logistic regression
stat.table

Tables of summary statistics
fit.add

Fit an addive excess risk model to interval censored data.
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.
bdendo

A case-control study of endometrial cancer
testisDK

Testis cancer incidence in Denmark, 1943--1996
Y.dk

Population risk time in Denmark
M.dk

Mortality in Denmark 1974 ff.
start.Lexis

Time series methods for Lexis objects
gmortDK

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

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

Compute confidence limits for a difference of two independent proportions.
fit.mult

Fits a multiplicative relative risk model to interval censored data.
contr.cum

Contrast matrices
foreign.Lexis

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

A Cohort of Nickel Smelters in South Wales
timeScales

The time scales of a Lexis object
ci.cum

Compute cumulative sum of estimates.
thoro

Thorotrast Study
plot.Lexis

Lexis diagrams
subset.Lexis

Subsetting Lexis (and stacked.Lexis) objects
twoby2

Analysis of a two by two table
pctab

Create percentages in a table
Lexis.lines

Draw life lines in a Lexis diagram.
ROC

Function to compute and draw ROC-curves.
cutLexis

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

Draw boxes and arrows for illustration of multistate models.
detrend

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

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

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

Transform a Lexis (or stacked.Lexis) objects
timeBand

Extract time band data from a split Lexis object
Ns

Natural splines - (cubic splines linear beyond outermost knots) with convenient specification of knots and possibility of centering and detrending.
plot.apc

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

The Danish National Diabetes Register.
births

Births in a London Hospital
float

Calculate floated variances
diet

Diet and heart data
occup

A small occupational cohort
ncut

Function to group a variable in intervals.
ewrates

Rates of lung and nasal cancer mortality, and total mortality.
cbind.Lexis

Combining a Lexis objects with data frames or other Lexis objects
brv

Bereavement in an elderly cohort
plotEst

Plot estimates with confidence limits (forest plot)
pc.lines

Plot period and cohort effects in an APC-frame.
mh

Mantel-Haenszel analyses of cohort and case-control studies
stattable.funs

Special functions for use in stat.table
lungDK

Male lung cancer incidence in Denmark
simLexis

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

hivDK: seroconversion in a cohort of Danish men