Type: | Package |
Title: | Survival Analysis for Weighted Composite Endpoints |
Version: | 1.0.2 |
Maintainer: | Sarah Rathwell <srathwel@ualberta.ca> |
URL: | https://github.com/sarah-0k/wcep |
BugReports: | https://github.com/sarah-0k/wcep |
Description: | Analyze given data frame with multiple endpoints and return Kaplan-Meier survival probabilities together with the specified confidence interval. See Nabipoor M, Westerhout CM, Rathwell S, and Bakal JA (2023) <doi:10.1186/s12874-023-01857-0>. |
License: | MIT + file LICENSE |
Encoding: | UTF-8 |
LazyData: | true |
Language: | en-us |
Depends: | R (≥ 3.6.0) |
Imports: | coin (≥ 1.3-1), dplyr (≥ 1.1.0), graphics (≥ 3.6.1), grDevices (≥ 3.6.1), progress (≥ 1.2.2), stats (≥ 3.6.1), tidyr (≥ 1.0.0) |
RoxygenNote: | 7.2.3 |
Suggests: | testthat (≥ 3.0.0) |
Collate: | 'data.R' 'nam.R' 'plot.R' 'wcep-package.R' 'wcep_core.R' 'wcep.R' |
Config/testthat/edition: | 3 |
NeedsCompilation: | no |
Packaged: | 2023-12-19 16:49:08 UTC; vapidmayhem |
Author: | Majid Nabipoor |
Repository: | CRAN |
Date/Publication: | 2023-12-19 17:20:02 UTC |
wcep: Survival Analysis for Weighted Composite Endpoints
Description
Analyze given data frame with multiple endpoints and return Kaplan-Meier survival probabilities together with the specified confidence interval. See Nabipoor M, Westerhout CM, Rathwell S, and Bakal JA (2023) doi:10.1186/s12874-023-01857-0.
Author(s)
Maintainer: Sarah Rathwell srathwel@ualberta.ca (ORCID)
Authors:
Majid Nabipoor nabipoor@ualberta.ca (ORCID)
Cynthia Westerhout cindy.westerhout@ualberta.ca (ORCID)
Jeffrey Bakal jbakal@ualberta.ca (ORCID)
See Also
Useful links:
Report bugs at https://github.com/sarah-0k/wcep
wcep plot
Description
Create a plot of Kaplan-Meier curve with its specified confidence interval
Usage
## S3 method for class 'wcep'
plot(
x,
main = " ",
type = "n",
lty = NULL,
lwd = NULL,
xlab = " ",
ylab = "Survival Probability",
xlim = NULL,
ylim = NULL,
cex = NULL,
...
)
Arguments
x |
is an object of class "wcep" |
main |
title of plot |
type |
type of plot |
lty |
line type |
lwd |
line width |
xlab |
first axis label |
ylab |
second axis label |
xlim |
first axis limits |
ylim |
second axis limits |
cex |
legend font size |
... |
other parameters of generic "plot" have no use here setOldClass("wcep") |
Toy example
Description
A data set containing patient IDs, event types, event times, and gender of 100 patients.
Usage
toyexample
Format
A data frame with 104 rows and 4 columns
- PTID
ID number of patients
- EvTp
Event Types: SHK as Shock, CHF as Congestive Heart Failure, REMI as Recurrent Myocardial Infarction, DTH as Death; and N as No event
- EvTm
Event Time (day)
- sex
Gender of patients, M as Male, F as Female
References
Armstrong P. W., Westerhout C. M., Van de Werf F., Califf R. M., Welsh R. C., Wilcox R. G., Bakal J. A. (2011) Refining clinical trial composite outcomes: an application to the Assessment of the Safety and Efficacy of a New Thrombolytic-3 (ASSENT-3) trial. American Heart Journal. 161(5) 848-854.
Source
It is a generated example based on ASSENT-3: https://pubmed.ncbi.nlm.nih.gov/21570513
Analysis of weighted composite endpoints
Description
Analyze given data frame and return Kaplan-Meier survival probabilities together with the specified confidence interval.
wcep
modifies Kaplan-Meier curve by taking into account severity weights of different event. Alternative methods are Anderson Gill model and win ratio of composite outcomes.The function takes event dataset and user-specified severity weights to generate a modified Kaplan-Meier curve and comparison statistics based on the weighted composite endpoint method. The user supplies the event data set, the weights, and the factor to split on . The package will generate the weighted survival curve, confidence interval and test the differences between the two groups.
Usage
wcep(x, EW, alpha = 0.05, split = FALSE)
Arguments
x |
This data frame usually has 3 columns. The first column specifies patient ID, which is a character or numeric vector, the second column is a factor with character values of event types. The third column is a numeric vector of event times. If split = TRUE, then the forth column is a character vector of split groups of at most two groups, like gender. |
EW |
This data frame has two columns. The first column specifies a character vector of event types. The second column specify weights. The naming of event types in x and EW should be exactly similar. |
alpha |
A numeric value between 0-1 which specifies the confidence level, if it is not specified, by default is 0.05. |
split |
A logical value of T or F which allows to compare two groups. |
References
Bakal J., Westerhout C. M., Armstrong P. W. (2015) Impact of weighted composite compared to traditional composite endpoints for the design of randomized controlled trails. Statistical Methods in Medicine Research. 24(6) 980-988.
Nabipoor M., Westerhout C. M., Rathwell S., Bakal J. (2023) The empirical estimate of the survival and variance using a weighted composite endpoint, BMC Medical Research Methodology. 23(35).
Author(s)
Majid Nabipoor: nabipoor@ualberta.ca, Cynthia Westerhout: cindy.westerhout@ualberta.ca, Jeffrey Bakal: jbakal@ualberta.ca
See Also
coxph
for Anderson Gill model
Examples
data(toyexample)
#event weights
EW <- data.frame(event = c('CHF','DTH','SHK','REMI'), weight = c(0.3,1,0.5,0.2))
res1 <- wcep(toyexample, EW)
str(res1)
res1$survival_probabilities
plot(res1)
#comparing two genders
res2 <- wcep(toyexample, EW, split=TRUE)
plot(res2)
#wilcox and t test
res2$Wilcoxontest
res2$t_test