{"id":24999113,"url":"https://github.com/shixiangwang/regport","last_synced_at":"2025-10-11T12:48:59.437Z","repository":{"id":62459025,"uuid":"473571948","full_name":"ShixiangWang/regport","owner":"ShixiangWang","description":"Regression Model Processing Port","archived":false,"fork":false,"pushed_at":"2025-08-18T01:52:11.000Z","size":1140,"stargazers_count":6,"open_issues_count":0,"forks_count":2,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-09-21T16:59:53.524Z","etag":null,"topics":["batch-processing","r-package","regression-models","rstats"],"latest_commit_sha":null,"homepage":"https://shixiangwang.github.io/regport/","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/ShixiangWang.png","metadata":{"files":{"readme":"README.Rmd","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":"2022-03-24T11:13:20.000Z","updated_at":"2025-08-18T01:52:14.000Z","dependencies_parsed_at":"2022-11-02T00:45:20.730Z","dependency_job_id":null,"html_url":"https://github.com/ShixiangWang/regport","commit_stats":null,"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"purl":"pkg:github/ShixiangWang/regport","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ShixiangWang%2Fregport","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ShixiangWang%2Fregport/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ShixiangWang%2Fregport/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ShixiangWang%2Fregport/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ShixiangWang","download_url":"https://codeload.github.com/ShixiangWang/regport/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ShixiangWang%2Fregport/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279007195,"owners_count":26084249,"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","status":"online","status_checked_at":"2025-10-11T02:00:06.511Z","response_time":55,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["batch-processing","r-package","regression-models","rstats"],"created_at":"2025-02-04T18:53:33.824Z","updated_at":"2025-10-11T12:48:59.424Z","avatar_url":"https://github.com/ShixiangWang.png","language":"R","funding_links":[],"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# regport\n\n\u003c!-- badges: start --\u003e\n[![CRAN status](https://www.r-pkg.org/badges/version/regport)](https://cran.r-project.org/package=regport) \n[![lifecycle](https://img.shields.io/badge/lifecycle-maturing-blue.svg)](https://lifecycle.r-lib.org/articles/stages.html)\n[![R-CMD-check](https://github.com/ShixiangWang/regport/workflows/R-CMD-check/badge.svg)](https://github.com/ShixiangWang/regport/actions) \n[![](https://cranlogs.r-pkg.org/badges/grand-total/regport?color=orange)](https://cran.r-project.org/package=regport) \n\n\u003c!-- badges: end --\u003e\n\nThe goal of regport is to provides R6 classes, methods and utilities to construct,\nanalyze, summarize, and visualize regression models (CoxPH and GLMs).\n\n\u003e This package is been superseded by [bregr](https://cran.r-project.org/package=bregr).\n\n## Installation\n\nYou can install the development version of regport like so:\n\n```r\nremotes::install_github(\"ShixiangWang/regport\")\n```\n\n## Simple case\n\nThis is a basic example which shows you how to build and visualize a Cox model.\n\nPrepare data:\n\n```{r}\nlibrary(regport)\nlibrary(survival)\n\nlung = survival::lung\nlung$sex = factor(lung$sex)\n```\nCreate a model:\n\n```{r}\nmodel = REGModel$new(\n  lung,\n  recipe = list(\n    x = c(\"age\", \"sex\"),\n    y = c(\"time\", \"status\")\n  )\n)\n\nmodel\n```\n\nYou can also create it with formula:\n\n```{r}\nmodel = REGModel$new(\n  lung,\n  recipe = Surv(time, status) ~ age + sex\n)\n\nmodel\n```\n\nTake a look at the model result (package `see` is required):\n\n```{r, fig.width=4, fig.width=6}\nmodel$plot()\n```\n\nVisualize with more nice forest plot.\n\n```{r dpi=300}\nmodel$get_forest_data()\nmodel$plot_forest()\n```\n\n## Batch processing models\n\nFor building a list of regression model, unlike above, a lazy building approach\nis used, i.e., `$build()` must manually typed after creating `REGModelList` object.\n(This also means you can check or modify the setting before building if necessary)\n\n```{r dpi=300}\nml \u003c- REGModelList$new(\n  data = mtcars,\n  y = \"mpg\",\n  x = c(\"factor(cyl)\", colnames(mtcars)[3:5]),\n  covars = c(colnames(mtcars)[8:9], \"factor(gear)\")\n)\nml\nml$build(f = \"gaussian\")\nstr(ml$result)\nstr(ml$forest_data)\n\nml$plot_forest(ref_line = 0, xlim = c(-15, 8))\n```\n\n## Coverage\n\n```{r}\ncovr::package_coverage()\n```\n\n## LICENSE\n\n(MIT) Copyright (c) 2022 Shixiang Wang\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshixiangwang%2Fregport","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fshixiangwang%2Fregport","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshixiangwang%2Fregport/lists"}