SiteRisksetsHelper: Construct risk set data

Description Usage Arguments Value Author(s)

Description

Construct risk set data classified by exposure status given the time variable, event status variable, exposure status variable, as well as time points to evaluate events and risk set sizes at. The time points for evaluation must include the observed event times. Otherwise, an interval may contain events and the riskset size definition at the end of the interval become ambiguous. As the observed time variable in the simulated dataset is coded in integer days, specifying all days in the intended follow up duration will assure inclusion of all event times.

Usage

1
SiteRisksetsHelper(time = NULL, event, A, W = NULL, eval_times = NULL)

Arguments

time

vector of the observed time variable. If omitted, taken to be all 0. Omit when event is a binary outcome variable without an accompanying time variable.

event

vector of the event status binary variable (must be 0, 1). A binary outcome variable can also be used if the outcome of interest is such a variable.

A

vector of the exposure status variable (must be 0, 1).

W

vector of the weights. Omit if not weighting.

eval_times

vector of time points to evaluate risk sets and event counts. Time 0 is always included. Required if time is given. When time is not given, it is taken to be 0 only.

Value

reduced risk set data frame having one row for each unique evaluation time.

Author(s)

Kazuki Yoshida


kaz-yos/distributed documentation built on May 27, 2019, 4:50 a.m.