Learn R Programming

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

eha (version 2.8.5)

Event History Analysis

Description

Parametric proportional hazards fitting with left truncation and right censoring for common families of distributions, piecewise constant hazards, and discrete models. Parametric accelerated failure time models for left truncated and right censored data. Proportional hazards models for tabular and register data. Sampling of risk sets in Cox regression, selections in the Lexis diagram, bootstrapping. Brostrm (2012) .

Copy Link

Version

Install

install.packages('eha')

Monthly Downloads

2,307

Version

2.8.5

License

GPL (>= 2)

Maintainer

Göran Broström

Last Published

January 12th, 2021

Functions in eha (2.8.5)

Lognormal

The Lognormal Distribution
Weibull

The (Cumulative) Hazard Function of a Weibull Distribution
age.window

Age cut of survival data
Pch

The Piecewise Constant Hazards distribution.
Loglogistic

The Loglogistic Distribution
Gompertz

The Gompertz Distribution
aftreg.fit

Parametric proportional hazards regression
aftreg

Accelerated Failure Time Regression
EV

The EV Distribution
SurvSplit

Split a survival object at specified durations.
coxreg

Cox regression
cal.window

Calendar time cut of survival data
frail.fit

Frailty experiment
fert

Marital fertility nineteenth century
import_strata

strata function imported from survival
child

Child mortality, Skellefte<U+00E5>, Sweeden 1850--1900.
logrank

The Log-rank test
import_Surv

Surv function imported from survival
logrye

Rye prices, Scania, southern Sweden, 1801-1894.
coxreg.fit

Cox regression
check.surv

Check the integrity of survival data.
pchreg

Piecewise Constant Proportional Hazards Regression
mlreg

ML proportional hazards regression
plot.phreg

Plots output from a phreg regression
scania

Old age mortality, Scania, southern Sweden, 1813-1894.
risksets

Finds the compositions and sizes of risk sets
check.dist

Graphical goodness-of-fit test
perstat

Period statistics
print.logrank

Prints logrank objects
plot.tpchreg

Plots output from a tpchreg regression
compHaz

Graphical comparison of cumulative hazards
coxfunk

Loglihood function (partial likelihood) of a Cox regression
plot.aftreg

Plots output from an AFT regression
print.phreg

Prints phreg objects
male.mortality

Male mortality in ages 40-60, nineteenth century
table.events

Calculating failure times, risk set sizes and No. of events in each risk set
mort

Male mortality in ages 40-60, nineteenth century
makeham

The Gompertz-Makeham Distribution
eha-package

eha: Event History Analysis
cro

Creates a minimal representation of a data frame.
swepop

Swedish population data, 1968-2019.
infants

Infant mortality and maternal death, Sweeden 1821--1894.
plot.coxreg

Plot method for coxreg objects
join.spells

Straighten up a survival data frame
ltx

LaTeX printing of regression results.
summary.phreg

A summary of phreg objects.
plotHaz

Graphical comparing of cumulative hazards
plot.weibreg

Plots output from a Weibull regression
hazards

Get baseline hazards atoms from fits from
summary.tpchreg

Summary for tpchreg objects
oe

Create an oe object
geome.fit

Constant intensity discrete time proportional hazards
tpchreg

Proportional hazards regression with piecewise constant hazards and tabular data.
oldmort

Old age mortality, Sundsvall, Sweden, 1860-1880.
print.summary.coxreg

Prints summary.coxreg objects
make.communal

Put communals in "fixed" data frame
phreg.fit

Parametric proportional hazards regression
piecewise

Piecewise hazards
plot.logrank

Plots of hazdata objects.
print.summary.phreg

Prints summary.phreg objects
plot.hazdata

Plots of hazdata objects.
weibreg

Weibull Regression
summary.aftreg

Prints aftreg objects
phfunc

Loglihood function of a proportional hazards regression
summary.coxreg

A summary of coxreg objects.
print.risksets

Prints a summary of the content of a set of risk sets.
toBinary

Transforms a "survival" data frame into a data frame suitable for binary (logistic) regression
phreg

Parametric Proportional Hazards Regression
print.aftreg

Prints aftreg objects
toDate

Convert time in years since "0000-01-01" to a date.
print.summary.tpchreg

Prints summary.tpchreg objects
swedeaths

Swedish death data, 1968-2019.
summary.weibreg

Prints a weibreg object
print.summary.aftreg

Prints summary.aftreg objects
print.coxreg

Prints coxreg objects
print.tpchreg

Prints tpchreg objects
weibreg.fit

Weibull regression
wfunk

Loglihood function of a Weibull regression
regtable

Retrieves regression tables
toTime

Calculate duration in years from "0000-01-01" to a given date
print.weibreg

Prints weibreg objects
toTpch

Transform survival data to tabular form