tneSurvByGroup: Time, No. at risk, No. events by group
Description
Gives time, no. at risk and no. events for survival data
by group
Usage
tneSurvByGroup(t, e, p, np, onlyEvents = FALSE)
Arguments
t
Times
e
No. events (overall)
p
Predictor
np
No. events for this predictor
onlyEvents
if TRUE shows only times at
which at least one event occurred. Otherwise shows
all times recorded (including those censored).
Value
A list with one element corresponding to each value of
the predictor $p$.
Each element is a matrix,
with one row for each observation.
The columns in the
matrix are:
ttime
nno. at risk
eno. events
References
Example is from: Klein J, Moeschberger M 2003
Survival Analysis, 2nd edition. New York:
Springer. Example 7.2, pg 210.