{"id":15051476,"url":"https://github.com/prise6/avirtualtwins","last_synced_at":"2025-04-10T02:56:27.723Z","repository":{"id":56937351,"uuid":"39650286","full_name":"prise6/aVirtualTwins","owner":"prise6","description":"Adaptation of Virtual Twins method from Jared Foster","archived":false,"fork":false,"pushed_at":"2018-02-04T17:07:16.000Z","size":174,"stargazers_count":4,"open_issues_count":1,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2024-04-29T22:17:42.125Z","etag":null,"topics":["r","rpackage","subgroup-identification","trials"],"latest_commit_sha":null,"homepage":null,"language":"R","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/prise6.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-07-24T18:29:01.000Z","updated_at":"2024-02-24T05:11:45.000Z","dependencies_parsed_at":"2022-08-21T06:50:09.214Z","dependency_job_id":null,"html_url":"https://github.com/prise6/aVirtualTwins","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/prise6%2FaVirtualTwins","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/prise6%2FaVirtualTwins/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/prise6%2FaVirtualTwins/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/prise6%2FaVirtualTwins/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/prise6","download_url":"https://codeload.github.com/prise6/aVirtualTwins/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248147689,"owners_count":21055545,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["r","rpackage","subgroup-identification","trials"],"created_at":"2024-09-24T21:35:50.693Z","updated_at":"2025-04-10T02:56:27.715Z","avatar_url":"https://github.com/prise6.png","language":"R","funding_links":[],"categories":[],"sub_categories":[],"readme":"# aVirtualTwins\n\n[![CRAN_Status_Badge](http://www.r-pkg.org/badges/version/aVirtualTwins)](https://cran.r-project.org/package=aVirtualTwins)\n\nAn 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)\n\nVirtualTwins is a method of subgroup identification from randomized clinical trial data.\n\nIn 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.\n\n## (Very) Quick Preview\n\n```r\n# Load data\ndata(sepsis)\n# Format data\nvt.obj \u003c- vt.data(dataset         = sepsis,\n                  outcome.field   = \"survival\",\n                  treatment.field = \"THERAPY\",\n                  interactions    = TRUE)\n# Print Incidences of sepsis data\nvt.obj$getIncidences()\n# $table\n#            trt\n# resp        0    1     sum  \n#   0         101  188   289  \n#   1         52   129   181  \n#   sum       153  317   470  \n#   Incidence 0.34 0.407 0.385\n#\n# $rr\n# [1] 1.197059\n#\n# First step : create random forest model\nvt.for \u003c- vt.forest(forest.type  = \"one\",\n                    vt.data      = vt.obj,\n                    interactions = TRUE,\n                    ntree        = 500)\n# Second step : find rules in data \nvt.trees \u003c- vt.tree(tree.type = \"class\",\n                    vt.difft  = vt.for, \n                    threshold = quantile(vt.for$difft, seq(.5,.8,.1)),\n                    maxdepth  = 2)\n# Print results\nvt.sbgrps \u003c- vt.subgroups(vt.trees)\nknitr::kable(vt.sbgrps)\n```\n|      |Subgroup                    |Subgroup size |Treatement event rate |Control event rate |Treatment sample size |Control sample size | RR (resub)| RR (snd)|\n|:-----|:---------------------------|:-------------|:---------------------|:------------------|:---------------------|:-------------------|----------:|--------:|\n|tree1 |PRAPACHE\u003e=26.5              |157           |0.752                 |0.327              |105                   |52                  |      2.300|    1.856|\n|tree3 |PRAPACHE\u003e=26.5 \u0026 AGE\u003e=51.74 |120           |0.897                 |0.31               |78                    |42                  |      2.894|    1.991|\n\n\n\n## Infos \n\nCurrently this package works for RCT with two treatments groups and binary outcome.\n\nMost of the package use Reference Class programing (in R). Feel free to create your own classes.\n\nOf course, subgroup identification in general with two treatment and severals group can be possible.\n\n## Help \u0026 Documentation\n\nSee wiki tab.\n\nOr:\n\n``` r\nvignette(\"full-example\", package = \"aVirtualTwins\")\n```\n\nOr:\n\nHere's a link to my intern dissertation (french version) [La recherche de sous-groupes par Virtual Twins](./rapport.pdf) (parts V \u0026 VI).\n\n\n## Install\n\n``` r\n# use devtools library\nlibrary(devtools)\n# install from github\ndevtools::install_github(\"prise6/aVirtualTwins\", build_vignettes = TRUE)\n# load library\nlibrary(aVirtualTwins)\n```\n\n\n## To-do list\n\n* Link to my simulation\n* ~~Submit to CRAN~~\n* Use R6 for perfs issues\n* ~~Vignette on-line~~\n\n\n## News\n\nSee NEWS file\n\n\n## Contact\n\nvieille.francois _at_ gmail.com\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fprise6%2Favirtualtwins","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fprise6%2Favirtualtwins","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fprise6%2Favirtualtwins/lists"}