1
0
Fork 0
mirror of https://github.com/prise6/aVirtualTwins.git synced 2024-04-27 19:12:45 +02:00
aVirtualTwins/README.md

108 lines
3.1 KiB
Markdown
Raw Permalink Normal View History

2015-07-24 20:03:34 +02:00
# aVirtualTwins
2015-06-21 03:53:27 +02:00
2018-01-31 00:40:38 +01:00
[![CRAN_Status_Badge](http://www.r-pkg.org/badges/version/aVirtualTwins)](https://cran.r-project.org/package=aVirtualTwins)
2016-10-10 10:37:11 +02:00
2015-06-21 03:53:27 +02:00
An adaptation of VirtualTwins method from [Foster, J. C., Taylor, J. M.G. and Ruberg, S. J. (2011)](http://onlinelibrary.wiley.com/doi/10.1002/sim.4322/abstract)
VirtualTwins is a method of subgroup identification from randomized clinical trial data.
2016-10-09 02:44:33 +02:00
In 2015, as an intern in a french pharmaceutical group, i worked on this method and develop a package based on Jared Foster and al method.
2015-06-21 03:53:27 +02:00
2015-07-25 02:10:28 +02:00
## (Very) Quick Preview
```r
# Load data
data(sepsis)
# Format data
2016-10-09 02:44:33 +02:00
vt.obj <- vt.data(dataset = sepsis,
outcome.field = "survival",
treatment.field = "THERAPY",
interactions = TRUE)
2015-07-30 01:03:47 +02:00
# Print Incidences of sepsis data
vt.obj$getIncidences()
# $table
# trt
# resp 0 1 sum
# 0 101 188 289
# 1 52 129 181
# sum 153 317 470
# Incidence 0.34 0.407 0.385
#
# $rr
# [1] 1.197059
#
2015-07-25 02:10:28 +02:00
# First step : create random forest model
2016-10-09 02:44:33 +02:00
vt.for <- vt.forest(forest.type = "one",
vt.data = vt.obj,
interactions = TRUE,
ntree = 500)
2015-07-25 02:10:28 +02:00
# Second step : find rules in data
2016-10-09 02:44:33 +02:00
vt.trees <- vt.tree(tree.type = "class",
vt.difft = vt.for,
threshold = quantile(vt.for$difft, seq(.5,.8,.1)),
2016-10-09 02:44:33 +02:00
maxdepth = 2)
2015-07-25 02:10:28 +02:00
# Print results
2015-07-25 02:16:20 +02:00
vt.sbgrps <- vt.subgroups(vt.trees)
knitr::kable(vt.sbgrps)
2015-07-25 02:10:28 +02:00
```
2015-08-31 21:14:07 +02:00
| |Subgroup |Subgroup size |Treatement event rate |Control event rate |Treatment sample size |Control sample size | RR (resub)| RR (snd)|
2015-07-25 02:16:20 +02:00
|:-----|:---------------------------|:-------------|:---------------------|:------------------|:---------------------|:-------------------|----------:|--------:|
|tree1 |PRAPACHE>=26.5 |157 |0.752 |0.327 |105 |52 | 2.300| 1.856|
|tree3 |PRAPACHE>=26.5 & AGE>=51.74 |120 |0.897 |0.31 |78 |42 | 2.894| 1.991|
2015-07-25 02:10:28 +02:00
2015-06-21 03:53:27 +02:00
## Infos
Currently this package works for RCT with two treatments groups and binary outcome.
2015-06-21 04:00:04 +02:00
Most of the package use Reference Class programing (in R). Feel free to create your own classes.
2015-06-21 03:53:27 +02:00
2016-10-09 02:44:33 +02:00
Of course, subgroup identification in general with two treatment and severals group can be possible.
2015-06-21 03:53:27 +02:00
## Help & Documentation
2016-10-09 04:05:33 +02:00
See wiki tab.
Or:
``` r
vignette("full-example", package = "aVirtualTwins")
```
2015-06-21 03:53:27 +02:00
2016-10-09 04:05:33 +02:00
Or:
2016-10-09 04:10:59 +02:00
Here's a link to my intern dissertation (french version) [La recherche de sous-groupes par Virtual Twins](http://upload.timfaitsoncinema.fr/p/2016-09/57e6a8ff.pdf) (parts V & VI).
2016-10-09 02:44:33 +02:00
2015-06-21 03:53:27 +02:00
## Install
2015-06-21 04:00:04 +02:00
``` r
2015-06-21 03:53:27 +02:00
# use devtools library
library(devtools)
# install from github
2016-10-09 02:44:33 +02:00
devtools::install_github("prise6/aVirtualTwins", build_vignettes = TRUE)
2015-06-21 03:53:27 +02:00
# load library
2015-07-24 20:30:47 +02:00
library(aVirtualTwins)
2015-06-21 03:53:27 +02:00
```
## To-do list
* Link to my simulation
2016-10-10 10:40:11 +02:00
* ~~Submit to CRAN~~
2016-10-09 02:44:33 +02:00
* Use R6 for perfs issues
2016-10-10 10:40:11 +02:00
* ~~Vignette on-line~~
2016-10-09 02:44:33 +02:00
## News
See NEWS file
## Contact
2015-06-21 03:53:27 +02:00
2016-10-09 02:44:33 +02:00
vieille.francois _at_ gmail.com
2015-06-21 03:53:27 +02:00