{"id":15893045,"url":"https://github.com/datastalker/survival-cox","last_synced_at":"2025-04-02T17:40:39.651Z","repository":{"id":255168867,"uuid":"848749039","full_name":"DataStalker/Survival-Cox","owner":"DataStalker","description":"This repository contains an R script for performing survival analysis on breast cancer surgery data from the University of Chicago's Billings Hospital. The analysis includes Kaplan-Meier estimation and Cox Proportional Hazards modeling to assess patient survival.","archived":false,"fork":false,"pushed_at":"2024-08-28T10:53:29.000Z","size":52,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-08T08:14:43.254Z","etag":null,"topics":["breast-cancer-prediction","cox-model","data-analysis","data-science","data-visualization","epidemiology","kaplan-meier","r","survival-analysis"],"latest_commit_sha":null,"homepage":"","language":"R","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/DataStalker.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-08-28T10:38:41.000Z","updated_at":"2024-08-28T10:54:47.000Z","dependencies_parsed_at":"2024-08-28T12:12:29.813Z","dependency_job_id":null,"html_url":"https://github.com/DataStalker/Survival-Cox","commit_stats":null,"previous_names":["datastalker/survival-cox"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DataStalker%2FSurvival-Cox","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DataStalker%2FSurvival-Cox/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DataStalker%2FSurvival-Cox/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DataStalker%2FSurvival-Cox/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/DataStalker","download_url":"https://codeload.github.com/DataStalker/Survival-Cox/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246863564,"owners_count":20846274,"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":["breast-cancer-prediction","cox-model","data-analysis","data-science","data-visualization","epidemiology","kaplan-meier","r","survival-analysis"],"created_at":"2024-10-06T08:06:39.508Z","updated_at":"2025-04-02T17:40:39.629Z","avatar_url":"https://github.com/DataStalker.png","language":"R","funding_links":[],"categories":[],"sub_categories":[],"readme":"## Cox Model Survival Analysis\n\n### About the Dataset\nThe dataset, `haberman.csv`, includes data from a study conducted between 1958 and 1970 at the University of Chicago's Billings Hospital. It focuses on the survival of breast cancer surgery patients.\n\n- **Number of Instances:** 306\n- **Number of Attributes:** 4\n  - Age of patient at time of operation (numerical)\n  - Patient's year of operation (year - 1900, numerical)\n  - Number of positive axillary nodes detected (numerical)\n  - Survival status (class attribute): \n    - `1` = Survived 5 years or longer\n    - `2` = Died within 5 years\n- **Missing Values:** None\n\n### Files\n- `haberman.csv`: The dataset used for survival analysis.\n- `cox-survival.md`: R Markdown file for performing survival analysis.\n\n### Usability\n- **License:** Unknown\n- **Expected Update Frequency:** Not specified\n\n### Analysis Overview\n1. **Introduction:** Explains the dataset and the objectives of the survival analysis.\n2. **Load Required Libraries:** Lists and loads the libraries needed for the analysis.\n3. **Data Import and Preview:** Imports the dataset and provides an initial preview.\n4. **Data Profiling:** Provides diagnostic statistics for numeric variables.\n5. **Defining Time and Event Variables:** Sets up variables for survival analysis.\n6. **Kaplan-Meier Estimator:** Fits and plots the Kaplan-Meier survival curve.\n7. **Stratified Kaplan-Meier Curves:** Creates and plots survival curves for different patient cohorts based on positive axillary nodes detected.\n8. **Cox Proportional Hazards Model:** Fits a Cox model to the data and summarizes the results.\n9. **Visualizing Cox Model Coefficients:** Generates a forest plot of Cox model coefficients.\n10. **Predicting Survival Curves for Specific Patients:** Predicts and plots survival curves for selected patients.\n\n### Example Code\nBelow is an example of loading the dataset and performing a Kaplan-Meier survival analysis:\n\n```r\nlibrary(tidyverse)\nlibrary(survival)\nlibrary(survminer)\nlibrary(dlookr)\nlibrary(gridExtra)\n\n# Load the dataset\ndata \u003c- read.csv('haberman.csv', header = FALSE)\ncolnames(data) \u003c- c('Age', 'Operation_year', 'Nb_pos_detected', 'Surv')\n\n# Kaplan-Meier Estimator\nkm_fit \u003c- survfit(Surv(Age, Surv) ~ 1, data = data)\nggsurvplot(km_fit, data = data, conf.int = FALSE, ggtheme = theme_minimal(), title = \"Kaplan-Meier Estimate\")\n```\n\n### Conclusion\nThe analysis explores patient survival probabilities using Kaplan-Meier estimation and Cox Proportional Hazards modeling. It provides insights into how various factors influence survival outcomes for breast cancer patients.\n\n---\n\nFeel free to adjust any section or add additional details as needed!\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdatastalker%2Fsurvival-cox","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdatastalker%2Fsurvival-cox","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdatastalker%2Fsurvival-cox/lists"}