Description Usage Arguments Value See Also Examples
Estimate and make inference on the while-alive loss (or event) rate across J groups under a user-specified loss function
1 |
id |
A vector of id variable. |
time |
A vector of follow-up times. |
status |
A vector of event type variable; 1 = recurrent event, 2 = death, and 0 = censoring. |
trt |
A vector of categorical (binary or multiclass) variable for treatment group. |
Dweight |
A non-negative weight for death relative to the recurrent event; Default is 0. |
wH |
A function of t and m to weight recurrent event; t: time; m: existing number of recurrent event; Default is the constant function of 1. |
wD |
A function of t and m to weight death; t: time; m: existing number of recurrent event; Default is the constant function of 0. |
An object of class LRfit
. See LRfit.object
for details.
LRfit.object
,
summary.LRfit
, plot.LRfit
.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | # load the HF-ACTION trial data
head(hfaction_cpx12)
# fit the data
dat<-hfaction_cpx12
obj<-LRfit(dat$id,dat$time,dat$status,dat$trt)
# print the event numbers by group
obj
# summarize the inference results for tau=3.5 years
# with joint test with RMST
summary(obj,tau=3.5,joint.test=TRUE)
# plot the estimated survival-completed cumulative loss
# by group, with 95% confidence intervals
plot(obj,conf=TRUE,xlab="Time (years)",xlim=c(0, 3.5),ylim=c(0,3),
ylab="Survival-completed cumulative frequency")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.