https://github.com/shixiangwang/ezcox
Easily Process a Batch of Cox Models
https://github.com/shixiangwang/ezcox
batch-processing cox-model r-package
Last synced: about 1 month ago
JSON representation
Easily Process a Batch of Cox Models
- Host: GitHub
- URL: https://github.com/shixiangwang/ezcox
- Owner: ShixiangWang
- License: gpl-3.0
- Created: 2019-08-06T09:55:11.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2024-01-05T01:47:41.000Z (over 1 year ago)
- Last Synced: 2024-08-09T08:07:35.131Z (9 months ago)
- Topics: batch-processing, cox-model, r-package
- Language: R
- Homepage: https://shixiangwang.github.io/ezcox/
- Size: 7.1 MB
- Stars: 20
- Watchers: 1
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.Rmd
- Contributing: .github/CONTRIBUTING.md
- License: LICENSE.md
Awesome Lists containing this project
README
---
output: github_document
---```{r, include = FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>",
fig.path = "man/figures/README-",
out.width = "100%"
)
```
# ezcox: Easily Process a Batch of Cox Models[](https://CRAN.R-project.org/package=ezcox)
[](https://cran.r-project.org/package=ezcox)
[](https://hits.seeyoufarm.com)

[](https://lifecycle.r-lib.org/articles/stages.html)The goal of ezcox is to operate a batch of univariate or multivariate Cox models and return tidy result.
## :arrow_double_down: Installation
You can install the released version of ezcox from [CRAN](https://CRAN.R-project.org) with:
```r
install.packages("ezcox")
```And the development version from [GitHub](https://github.com/) with:
```r
# install.packages("remotes")
remotes::install_github("ShixiangWang/ezcox")
```It is possible to install **ezcox** from Conda `conda-forge` channel:
```r
conda install r-ezcox --channel conda-forge
```Visualization feature of **ezcox** needs the recent version of **forestmodel**, please run the following commands:
```r
remotes::install_github("ShixiangWang/forestmodel")
```## :beginner: Example
This is a basic example which shows you how to get result from a batch of cox models.
```{r example}
library(ezcox)
library(survival)# Build unvariable models
ezcox(lung, covariates = c("age", "sex", "ph.ecog"))# Build multi-variable models
# Control variable 'age'
ezcox(lung, covariates = c("sex", "ph.ecog"), controls = "age")
``````{r}
lung$ph.ecog = factor(lung$ph.ecog)
zz = ezcox(lung, covariates = c("sex", "ph.ecog"), controls = "age", return_models=TRUE)
mds = get_models(zz)
str(mds, max.level = 1)show_models(mds)
```## :star2: Vignettes
- [ezcox: Easily Process a Batch of Cox Models](https://CRAN.R-project.org/package=ezcox/vignettes/ezcox.html)
- [ezcox: Easily Show Cox Forestplot in One Command](https://CRAN.R-project.org/package=ezcox/vignettes/ezforest.html)
- [ezcox: Easy Group Cox Analysis and Visualization](https://CRAN.R-project.org/package=ezcox/vignettes/ezgroup.html)
- [ezcox: an R Package for Cox Model Batch Processing and Visualization - An Use Case](https://shixiangwang.github.io/ezcox-adv-usage/)## :page_with_curl: Citation
If you are using it in academic research,
please cite the preprint [arXiv:2110.14232](https://arxiv.org/abs/2110.14232) along with URL of this repo.