1
0
Fork 0
mirror of https://github.com/prise6/aVirtualTwins.git synced 2024-05-10 20:56:32 +02:00
aVirtualTwins/README.md

76 lines
3 KiB
Markdown
Raw Normal View History

2015-07-24 20:03:34 +02:00
# aVirtualTwins
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.
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-07-25 02:10:28 +02:00
## (Very) Quick Preview
```r
# Load data
data(sepsis)
# Format data
vt.obj <- vt.data(sepsis, "survival", "THERAPY", T)
# First step : create random forest model
vt.for <- vt.forest("one", vt.obj, T, ntree = 500)
# Second step : find rules in data
vt.trees <- vt.tree("class", vt.for, threshold = quantile(vt.for$difft, seq(.5,.8,.1)), maxdepth = 2)
# Print results
(vt.subgroups <- lapply(vt.trees, function(x)x$getRules(only.fav = T, verbose = F)))
```
| |Subgroup |Subgroup size |Treatement event rate |Control event rate |Treatment sample size |Control sample size | RR (resub)| RR (snd)|
|:-------|:---------------------------|:-------------|:---------------------|:------------------|:---------------------|:-------------------|----------:|--------:|
|tree1 |PRAPACHE>=26.5 |157 |0.752 |0.327 |105 |52 | 2.300| 1.873|
|tree2 |PRAPACHE>=26.5 |157 |0.752 |0.327 |105 |52 | 2.300| 1.873|
|tree3.3 |PRAPACHE>=26.5 |157 |0.752 |0.327 |105 |52 | 2.300| 1.873|
|tree3.7 |PRAPACHE>=26.5 & AGE>=54.88 |111 |0.887 |0.325 |71 |40 | 2.729| 2.026|
|tree4.3 |PRAPACHE>=26.5 |157 |0.752 |0.327 |105 |52 | 2.300| 1.873|
|tree4.7 |PRAPACHE>=26.5 & AGE>=54.88 |111 |0.887 |0.325 |71 |40 | 2.729| 2.026|
2015-06-21 03:53:27 +02:00
## Infos
Currently this package works for RCT with two treatments groups and binary outcome.
This is the *dev version 0.0.0.2* and often updated.
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
I got a *WARNING* when Checking package for "cheking PDF version of manual" because of my version of LaTeX. Need to fix it.
## To-do list
* Description and help
* Vignette example
* ...
## 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
2015-07-24 20:30:47 +02:00
devtools::install_github("prise6/aVirtualTwins@dev")
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
```
## Help
2015-06-21 04:04:57 +02:00
* _Vignette is really not finished ..._
2015-06-21 03:53:27 +02:00
2015-07-24 20:30:47 +02:00
See [full-example](http://htmlpreview.github.io/?https://github.com/prise6/aVirtualTwins/blob/dev/inst/doc/full-example.html)
2015-06-21 04:00:04 +02:00
or when installed :
``` r
2015-07-24 20:03:34 +02:00
vignette("full-example", package = "aVirtualTwins")
2015-06-21 03:53:27 +02:00
```
## Few Examples
2015-06-21 04:00:04 +02:00
* _Coming..._
2015-06-21 03:53:27 +02:00