Description Usage Arguments References Author(s) See Also Examples

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.

1 |

`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. |

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 Vol. 24(6) 980-988

Majid Nabipoor: nabipoor@ualberta.ca, Cynthia Westerhout: cindy.westerhout@ualberta.ca, Jeffrey Bakal: jbakal@ualberta.ca

`coxph`

for Anderson Gill model

1 2 3 4 5 6 7 8 9 10 11 12 13 | ```
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
``` |

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.