RiskSet: Risk Set

Description Usage Arguments Details Value Examples

View source: R/survivalfunctions.R

Description

Computes the risk set for a given vector x

Usage

1
RiskSet(x, d = NA, u = NA)

Arguments

x

The data

d

The left truncation points (optional)

u

The right censoring points (optional)

Details

If d and u are provided, they should be the same lenggth as x. Entries of d, u and x can be set to NA where applicable.

Value

A data frame containing the unique values of x (y), the counts for each unique value (s), and the risk set (r)

Examples

1
2
x <- c(1.0,1.3,1.5,1.5,2.1,2.1,2.1,2.8)
rs <- RiskSet(x)

nathanesau/lmodels documentation built on May 23, 2019, 12:19 p.m.