mirror of
https://github.com/prise6/aVirtualTwins.git
synced 2024-05-02 19:53:09 +02:00
Add quick examplre and reorganize presentation
This commit is contained in:
parent
94495e5bec
commit
4846c4ee34
45
README.md
45
README.md
|
@ -13,15 +13,29 @@ As an intern in a french pharmaceutical group, i worked on this method and devel
|
||||||
data(sepsis)
|
data(sepsis)
|
||||||
# Format data
|
# Format data
|
||||||
vt.obj <- vt.data(sepsis, "survival", "THERAPY", T)
|
vt.obj <- vt.data(sepsis, "survival", "THERAPY", T)
|
||||||
|
# $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
|
||||||
|
#
|
||||||
# First step : create random forest model
|
# First step : create random forest model
|
||||||
vt.for <- vt.forest("one", vt.obj, T, ntree = 500)
|
vt.for <- vt.forest("one", vt.obj, T, ntree = 500)
|
||||||
# Second step : find rules in data
|
# Second step : find rules in data
|
||||||
vt.trees <- vt.tree("class", vt.for, threshold = quantile(vt.for$difft, seq(.5,.8,.1)), maxdepth = 2)
|
vt.trees <- vt.tree("class",
|
||||||
|
vt.for,
|
||||||
|
threshold = quantile(vt.for$difft, seq(.5,.8,.1)),
|
||||||
|
maxdepth = 2)
|
||||||
# Print results
|
# Print results
|
||||||
vt.sbgrps <- vt.subgroups(vt.trees)
|
vt.sbgrps <- vt.subgroups(vt.trees)
|
||||||
knitr::kable(vt.sbgrps)
|
knitr::kable(vt.sbgrps)
|
||||||
```
|
```
|
||||||
| |Subgroup |Subgroup size |Treatement event rate |Control event rate |Treatment sample size |Control sample size | RR (resub)| RR (snd)|
|
| |Subgroup |Subgroup size |Treatement \n 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.856|
|
|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|
|
|tree3 |PRAPACHE>=26.5 & AGE>=51.74 |120 |0.897 |0.31 |78 |42 | 2.894| 1.991|
|
||||||
|
@ -38,11 +52,17 @@ Most of the package use Reference Class programing (in R). Feel free to create y
|
||||||
|
|
||||||
I got a *WARNING* when Checking package for "cheking PDF version of manual" because of my version of LaTeX. Need to fix it.
|
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
|
## Help & Documentation
|
||||||
* Vignette example
|
|
||||||
* ...
|
_Vignette is not finished ..._
|
||||||
|
|
||||||
|
See [full-example](http://htmlpreview.github.io/?https://github.com/prise6/aVirtualTwins/blob/dev/inst/doc/full-example.html)
|
||||||
|
|
||||||
|
or when installed :
|
||||||
|
``` r
|
||||||
|
vignette("full-example", package = "aVirtualTwins")
|
||||||
|
```
|
||||||
|
|
||||||
## Install
|
## Install
|
||||||
|
|
||||||
|
@ -55,14 +75,13 @@ devtools::install_github("prise6/aVirtualTwins@dev")
|
||||||
library(aVirtualTwins)
|
library(aVirtualTwins)
|
||||||
```
|
```
|
||||||
|
|
||||||
## Help
|
|
||||||
|
|
||||||
* _Vignette is really not finished ..._
|
## To-do list
|
||||||
|
|
||||||
|
* More description
|
||||||
|
* Finish full-example vignette
|
||||||
|
* Link to my simulation
|
||||||
|
* ...
|
||||||
|
|
||||||
See [full-example](http://htmlpreview.github.io/?https://github.com/prise6/aVirtualTwins/blob/dev/inst/doc/full-example.html)
|
|
||||||
|
|
||||||
or when installed :
|
|
||||||
``` r
|
|
||||||
vignette("full-example", package = "aVirtualTwins")
|
|
||||||
```
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue