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

check.surv

Check the integrity of survival data.


Description

Check that exit occurs after enter, that spells from an individual do not overlap, and that each individual experiences at most one event.

Usage

check.surv(enter, exit, event, id = NULL, eps = 1e-08)

Arguments

enter

Left truncation time.

exit

Time of exit.

event

Indicator of event. Zero means 'no event'.

id

Identification of individuals.

eps

The smallest allowed spell length or overlap.

Details

Interval lengths must be strictly positive.

Value

A vector of id's for the insane individuals. Of zero length if no errors.

Author(s)

Göran Broström

See Also

Examples

xx <- data.frame(enter = c(0, 1), exit = c(1.5, 3), event = c(0, 1), id =
c(1,1))
check.surv(xx$enter, xx$exit, xx$event, xx$id)

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.