{"id":18733564,"url":"https://github.com/insightsengineering/unicate","last_synced_at":"2025-07-17T06:35:09.467Z","repository":{"id":44567882,"uuid":"410018591","full_name":"insightsengineering/uniCATE","owner":"insightsengineering","description":"Univariate conditional average treatment effect estimation for predictive biomarker discovery","archived":false,"fork":false,"pushed_at":"2024-03-15T15:37:42.000Z","size":571,"stargazers_count":4,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-04-12T18:51:35.643Z","etag":null,"topics":["biomarkers","clinical-trials","high-dimensional-data","nonparametrics","r","treatment-effects"],"latest_commit_sha":null,"homepage":"https://insightsengineering.github.io/uniCATE/","language":"R","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/insightsengineering.png","metadata":{"files":{"readme":"README.Rmd","changelog":"NEWS.md","contributing":".github/CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null},"funding":{"custom":["https://pharmaverse.org"]}},"created_at":"2021-09-24T15:43:45.000Z","updated_at":"2023-03-01T19:42:00.000Z","dependencies_parsed_at":"2024-11-07T15:10:34.457Z","dependency_job_id":null,"html_url":"https://github.com/insightsengineering/uniCATE","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/insightsengineering/uniCATE","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/insightsengineering%2FuniCATE","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/insightsengineering%2FuniCATE/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/insightsengineering%2FuniCATE/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/insightsengineering%2FuniCATE/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/insightsengineering","download_url":"https://codeload.github.com/insightsengineering/uniCATE/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/insightsengineering%2FuniCATE/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265573603,"owners_count":23790468,"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":["biomarkers","clinical-trials","high-dimensional-data","nonparametrics","r","treatment-effects"],"created_at":"2024-11-07T15:10:28.034Z","updated_at":"2025-07-17T06:35:09.443Z","avatar_url":"https://github.com/insightsengineering.png","language":"R","funding_links":["https://pharmaverse.org"],"categories":[],"sub_categories":[],"readme":"---\noutput: github_document\n---\n\n\u003c!-- README.md is generated from README.Rmd. Please edit that file --\u003e\n\n```{r, include = FALSE}\nknitr::opts_chunk$set(\n  collapse = TRUE,\n  comment = \"#\u003e\",\n  fig.path = \"man/figures/README-\",\n  out.width = \"100%\"\n)\n```\n\n# R/`uniCATE`\n\n\u003e Univariate Conditional Average Treatment Effect Estimation\n\n__Author:__ [Philippe Boileau](https://pboileau.ca/)\n\n\u003c!-- badges: start --\u003e\n[![Check](https://github.com/insightsengineering/uniCATE/actions/workflows/check.yaml/badge.svg)](https://github.com/insightsengineering/uniCATE/actions/workflows/check.yaml)\n[![Docs](https://github.com/insightsengineering/uniCATE/actions/workflows/docs.yaml/badge.svg)](https://github.com/insightsengineering/uniCATE/actions/workflows/docs.yaml)\n[![Project Status: Inactive – The project has reached a stable, usable state but\nis no longer being actively developed; support/maintenance will be provided as\ntime\nallows.](https://www.repostatus.org/badges/latest/inactive.svg)](https://www.repostatus.org/#inactive)\n\u003c!-- badges: end --\u003e\n\n---\n\n`uniCATE` implements statistical inference procedures for variable importance\nmeasures that assess the treatment effect modification capabilities of\nindividual pre-treatment biomarkers in high-dimensional randomized control\ntrials. This variable importance measure is defined as the vector of simple\nlinear regression slope coefficients obtained by regressing the difference in\npotential outcomes on each biomarker. This parameter, which we dub the\n*univariate conditional average treatment effect*, is a reasonable indicator of\ntreatment effect modification in all but pathological biomarker-outcome\nrelationships, and can therefore be used to identify predictive biomarkers.\nAssumption-lean estimation and testing procedures based on semiparametric theory\nare made available for continuous, binary, and right-censored time-to-event\noutcomes. Additional details are provided in [*A Flexible Approach for\nPredictive Biomarker Discovery* by Boileau et\nal.](https://academic.oup.com/biostatistics/advance-article/doi/10.1093/biostatistics/kxac029/6647929).\n\nIf you are looking to apply similar methods to observational study data, check\nout the [`unihtee` R package](https://github.com/insightsengineering/unihtee).\n\n## Installation\n\nThis package can be installed directly from GitHub using\n[`remotes`](https://CRAN.R-project.org/package=remotes):\n\n```{r gh-master-installation, eval=FALSE}\nremotes::install_github(\"insightsengineering/uniCATE\")\n```\n\n## Usage\n\n`unicate()` should be used when the outcome is continuous or binary. For\nright-censored time-to-event outcomes, use `sunicate()`.\n\n## Example\n\nWe simulate a randomized control trial in which there is a heterogeneous\ntreatment effect for biomarkers 1 and 2. `unicate()` successfully identifies\nthese biomarkers as effect modifiers.\n\n```{r setup, include=FALSE}\nlibrary(uniCATE)\nlibrary(dplyr)\nlibrary(sl3)\n```\n```{r fake-setup, eval=FALSE}\n# load the required libraries\nlibrary(uniCATE)\nlibrary(dplyr)\nlibrary(sl3)\n```\n```{r example}\n# set the seed for reproducibility\nset.seed(514)\n\n# simulate some randomized control data\nn \u003c- 100\ndata \u003c- tibble(\"treatment\" = rbinom(n, 1, 0.5)) %\u003e%\n  mutate(\n    bio1 = rnorm(n, mean = 2, sd = 0.2),\n    bio2 = rnorm(n, mean = -2, sd = 0.2),\n    bio3 = rnorm(n, mean = 0, sd = 0.1),\n    bio4 = rnorm(n, mean = 0, sd = 0.1),\n    covar = 0.2 * rbinom(n, 1, 0.4),\n    response = covar + bio1 * treatment + bio2 * treatment\n  )\n\n# define the required arguments\ncovariates \u003c- c(\"bio1\", \"bio2\", \"bio3\", \"bio4\", \"covar\")\nbiomarkers \u003c- c(\"bio1\", \"bio2\", \"bio3\", \"bio4\")\npropensity_score_ls \u003c- list(\"1\" = 0.5, \"0\" = 0.5)\n\n# create a simple SuperLearner using a linear model and a random forest\ninteractions \u003c- lapply(biomarkers, function(b) c(b, \"treatment\"))\nlrnr_interactions \u003c- sl3::Lrnr_define_interactions$new(interactions)\nlrnr_glm \u003c- sl3::make_learner(\n  sl3::Pipeline, lrnr_interactions, sl3::Lrnr_glm$new()\n)\nlrnr_sl \u003c- Lrnr_sl$new(\n  learners = make_learner(\n    Stack, Lrnr_ranger$new(), lrnr_glm\n  ),\n  metalearner = make_learner(Lrnr_nnls)\n)\n\n# apply uniCATE to the simulated data\nunicate(\n  data,\n  outcome = \"response\",\n  treatment = \"treatment\",\n  covariates = covariates,\n  biomarkers = biomarkers,\n  propensity_score_ls = propensity_score_ls,\n  super_learner = lrnr_sl,\n  v_folds = 2L\n)\n```\n\n## Issues\n\nIf you encounter any bugs or have any specific feature requests, please [file\nan issue](https://github.com/insightsengineering/uniCATE/issues).\n\n\n## Contributions\n\nContributions are very welcome. Interested contributors should consult our\n[contribution\nguidelines](https://github.com/insightsengineering/uniCATE/blob/master/.github/CONTRIBUTING.md)\nprior to submitting a pull request.\n\n## Citation\n\nYou can cite this package and the methodology used therein with the following\nBibTeX entries:\n\n```\n@manual{uniCATE,\n  title = {uniCATE: Univariate Conditional Average Treatment Effect Estimation},\n  author = {Philippe Boileau},\n  year = {2023},\n  note = {R package version 0.4.0},\n}\n  \n@article{boileau2022,\n  author = {Boileau, Philippe and Qi, Nina Ting and van der Laan, Mark J and Dudoit, Sandrine and Leng, Ning},\n  title = \"{A flexible approach for predictive biomarker discovery}\",\n  journal = {Biostatistics},\n  year = {2022},\n  month = {07},\n  issn = {1465-4644},\n  doi = {10.1093/biostatistics/kxac029},\n  url = {https://doi.org/10.1093/biostatistics/kxac029}\n}\n```\n\n## License\n\nThe contents of this repository are distributed under the Apache 2.0 license.\nSee the\n[`LICENSE.md`](https://github.com/insightsengineering/uniCATE/blob/main/LICENSE.md)\nand [`LICENSE`](https://github.com/insightsengineering/uniCATE/blob/main/LICENSE)\nfiles for details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Finsightsengineering%2Funicate","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Finsightsengineering%2Funicate","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Finsightsengineering%2Funicate/lists"}