Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

table.events

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


Description

From input data of the 'interval' type, with an event indicator, summary statistics for each risk set (at an event time point) are calculated.

Usage

table.events(enter = rep(0, length(exit)), exit, event, strict = TRUE)

Arguments

enter

Left truncation time point.

exit

End time point, an event or a right censoring.

event

Event indicator.

strict

If TRUE, then tabulating is not done after a time point where all individuals in a riskset failed.

Value

A list with components

times

Ordered distinct event time points.

events

Number of events at each event time point.

riskset.sizes

Number at risk at each event time point.

Author(s)

Göran Broström

See Also

Examples

exit = c(1,2,3,4,5)
event = c(1,1,0,1,1)
table.events(exit = exit, event = event)

eha

Event History Analysis

v2.10.0
GPL (>= 2)
Authors
Göran Broström [aut, cre], Jianming Jin [ctb]
Initial release
2022-04-17

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.