Type: | Package |
Title: | While-Alive Loss Rate for Recurrent Event in the Presence of Death |
Version: | 1.0 |
Author: | Lu Mao |
Maintainer: | Lu Mao <lmao@biostat.wisc.edu> |
URL: | https://sites.google.com/view/lmaowisc/ |
Description: | Contains inferential and graphical routines for multi-group analysis of while-alive loss (or event) rate for possibly recurrent nonfatal event in the presence of death. |
License: | GPL-2 | GPL-3 [expanded from: GPL (≥ 2)] |
Encoding: | UTF-8 |
LazyData: | true |
RoxygenNote: | 7.1.1 |
Suggests: | knitr, rmarkdown |
VignetteBuilder: | knitr |
Depends: | R (≥ 2.10) |
NeedsCompilation: | no |
Packaged: | 2021-11-15 19:34:56 UTC; lmao |
Repository: | CRAN |
Date/Publication: | 2021-11-17 20:10:05 UTC |
Estimate the while-alive loss (event) rate
Description
Estimate and make inference on the while-alive loss (or event) rate
across J
groups under a user-specified loss function
Usage
LRfit(id, time, status, trt, Dweight = 0, wH = NULL, wD = NULL)
Arguments
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 |
wD |
A function of |
Value
An object of class LRfit
. See LRfit.object
for details.
See Also
LRfit.object
,
summary.LRfit
, plot.LRfit
.
Examples
# 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")
Estimated while-alive loss rates
Description
This class of objects is returned by the LRfit
functions.
Objects of this class have methods for the functions print
,
summary
, and plot
.
Value
All numerical results of an object obj
are contained in obj$content
, which
is organized in a two-dimensional array with each column containing the results
for one group. Below are the row variables.
t |
A vector of follow-up times |
llr |
A vector of log-loss rate estimates at |
se_llr |
A vector of standard error estimates for the log-loss rates
in |
lmuR |
A vector of log-raw cumulative loss estimates at |
se_lmuR |
A vector of standard error estimates for the log-raw
cumulative losses in |
lmuD |
A vector of log-RMST estimates at |
se_lmuD |
A vector of standard error estimates for the log-RMST in |
St |
A vector of overall survival probabilities at |
... |
See Also
LRfit
, summary.LRfit
, plot.LRfit
.
A dataset from the HF-ACTION trial
Description
The Heart Failure: A Controlled Trial Investigating Outcomes of Exercise Training (HF-ACTION) study was conducted between 2003–2007 to investigate whether adding exercise training to the usual care of heart failure patients improves their cardiovascular outcomes (O'Conner et al., 2009). This dataset is for a high-risk subgroup consisting of 741 nonischemic patients with baseline cardiopulmonary test duration less than or equal to 12 minutes and analyze recurrent hospitalizations as well as overall survival.
Usage
hfaction_cpx12
Format
A data frame with 2,132 rows and 4 variables:
- id
Unique patient ID.
- time
Event time (years).
- status
Event type; 1 = hospitalization, 2 = death, 0 = censoring.
- trt
1 = exercise training, 0 = usual care.
References
O'CONNOR, C. M., WHELLAN, D. J., LEE, K. L., KETEYIAN, S. J., COOPER, L. S., ELLIS, S. J., LEIFER, E. S., KRAUS, W. E., KITZMAN, D. W., BLUMENTHAL, J. A. et al. (2009). Efficacy and safety of exercise training in patients with chronic heart failure: Hf-action randomized controlled trial. J. Am. Med. Assoc. 301, 1439–1450.
Plot the estimated survival-completed cumulative loss curve
Description
Plot the estimated survival-completed cumulative loss (while-alive loss rate times the length of follow-up) as a function of the time horizon.
Usage
## S3 method for class 'LRfit'
plot(
x,
group = NULL,
conf = FALSE,
main = NULL,
xlim = NULL,
ylim = NULL,
xlab = "Follow-up time",
ylab = "Survival-completed cumulative loss",
group.col = NULL,
conf.lty = 3,
lwd = 2,
legend = TRUE,
...
)
Arguments
x |
An object returned by |
group |
Specifies the group to be plotted. |
conf |
If TRUE, 95% confidence limits for the target curve are overlaid. |
main |
A main title for the plot. |
xlim |
The x limits of the plot. |
ylim |
The y limits of the plot. |
xlab |
A label for the x axis, defaults to a description of x. |
ylab |
A label for the y axis, defaults to a description of y. |
group.col |
A vector of colors for the group-specific curves; must be commensurate with the number of groups. |
conf.lty |
Line type for the confidence limits if |
lwd |
Line width. |
legend |
If TRUE, a crude legend for the group-specific curves will appear on the bottom right corner of the graph. |
... |
Other arguments that can be passed to the underlying |
Value
No return value, called for side effects.
See Also
Examples
# 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")
Print a short summary of LRfit objects
Description
Print the results for the restricted mean times in favor of treatment.
Usage
## S3 method for class 'LRfit'
print(x, ...)
Arguments
x |
An object returned by |
... |
Further arguments passed to or from other methods |
Value
No return value, called for side effects.
Print method for summary.LRfit objects
Description
Produces a printed summary of the results for the while-alive loss rate
Usage
## S3 method for class 'summary.LRfit'
print(x, ...)
Arguments
x |
An object returned by |
... |
Further arguments passed to or from other methods |
Value
No return value, called for side effects.
Summary of the analysis results
Description
Summarize the inferential results for group-specific while-alive loss rates and the loss rate ratios at a user-specified length of follow-up.
Usage
## S3 method for class 'LRfit'
summary(object, tau = NULL, ref = NULL, joint.test = FALSE, ...)
Arguments
object |
An object returned by |
tau |
A positive real number for the follow-up time; Default is the maximum event time in the data. |
ref |
The label of the group to be set as the reference; Default is the first level by numerical or alphabetical order |
joint.test |
If TRUE, joint analysis with the restricted mean survival time (RMST) will be performed; Default is FALSE. |
... |
Additional arguments affecting the summary produced. |
Value
An object of class summary.LRfit
with components
LRtab |
A |
Rtab |
A |
Dtab |
A |
LRpval |
|
LRDpval |
|
... |
See Also
Examples
#See examples for LRfit().