{"id":18733530,"url":"https://github.com/insightsengineering/simidm","last_synced_at":"2025-04-12T18:31:45.553Z","repository":{"id":65507469,"uuid":"438630520","full_name":"insightsengineering/simIDM","owner":"insightsengineering","description":"Simulation Engine for Multistate Models","archived":false,"fork":false,"pushed_at":"2025-02-12T13:06:24.000Z","size":4241,"stargazers_count":13,"open_issues_count":0,"forks_count":1,"subscribers_count":6,"default_branch":"main","last_synced_at":"2025-03-21T12:16:33.684Z","etag":null,"topics":["multistate-models","r","simulation-engine"],"latest_commit_sha":null,"homepage":"https://insightsengineering.github.io/simIDM/","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/insightsengineering.png","metadata":{"files":{"readme":"README.md","changelog":"NEWS.md","contributing":null,"funding":null,"license":null,"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},"funding":{"custom":["https://pharmaverse.org"]}},"created_at":"2021-12-15T12:58:54.000Z","updated_at":"2025-02-12T12:57:19.000Z","dependencies_parsed_at":"2023-11-27T14:40:53.489Z","dependency_job_id":"797a4931-764f-48ed-8b18-289dff9453f5","html_url":"https://github.com/insightsengineering/simIDM","commit_stats":{"total_commits":69,"total_committers":11,"mean_commits":"6.2727272727272725","dds":0.6666666666666667,"last_synced_commit":"92ad47ed71c9f438adf379964aa75eca3c0c7571"},"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/insightsengineering%2FsimIDM","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/insightsengineering%2FsimIDM/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/insightsengineering%2FsimIDM/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/insightsengineering%2FsimIDM/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/insightsengineering","download_url":"https://codeload.github.com/insightsengineering/simIDM/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248613528,"owners_count":21133528,"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":["multistate-models","r","simulation-engine"],"created_at":"2024-11-07T15:10:14.598Z","updated_at":"2025-04-12T18:31:45.540Z","avatar_url":"https://github.com/insightsengineering.png","language":"R","funding_links":["https://pharmaverse.org"],"categories":[],"sub_categories":[],"readme":"\n\u003c!-- markdownlint-disable-file --\u003e\n\n\u003c!-- README.md needs to be generated from README.Rmd. Please edit that file --\u003e\n\n# simIDM \u003cimg src=\"man/figures/logo.svg\" align=\"right\" height=\"139\" /\u003e\n\n\u003c!-- badges: start --\u003e\n\n[![Project Status: Active – The project has reached a stable, usable\nstate and is being actively\ndeveloped.](https://www.repostatus.org/badges/latest/active.svg)](https://www.repostatus.org/#active)\n[![CRAN\nstatus](https://www.r-pkg.org/badges/version-last-release/simIDM)](https://www.r-pkg.org/badges/version-last-release/simIDM)\n[![CRAN monthly\ndownloads](https://cranlogs.r-pkg.org/badges/simIDM)](https://cranlogs.r-pkg.org/badges/simIDM)\n[![CRAN total\ndownloads](https://cranlogs.r-pkg.org/badges/grand-total/simIDM)](https://cranlogs.r-pkg.org/badges/grand-total/simIDM)\n[![Code\nCoverage](https://raw.githubusercontent.com/insightsengineering/simIDM/_xml_coverage_reports/data/main/badge.svg)](https://raw.githubusercontent.com/insightsengineering/simIDM/_xml_coverage_reports/data/main/coverage.xml)\n\u003c!-- badges: end --\u003e  \n\nSurvival multistate models are a powerful and flexible tool for modeling\nand analyzing complex time-to-event data. The three-state illness-death\nmodel can be used to jointly model the oncology endpoints\nprogression-free survival (PFS) and overall survival (OS). Jointly\nmodeling the endpoints PFS and OS with the illness-death model has the\nmajor advantage of both adequately accounting for the correlation of the\ntwo endpoints and eliminating the need of the strong assumption of\nproportional hazards. This package provides the tools to simulate a\nlarge number of clinical trials with endpoints OS and PFS based on the\nillness-death model, which can be used for trail planning, for example.\nThe simulation set-up allows random and event-driven censoring, an\narbitrary number of treatment arms, staggered study entry and drop-out.\nExponentially, Weibull and piecewise exponentially distributed survival\ntimes can be generated. In addition, the correlation between PFS and OS\ncan be calculated based on the simulation scenario, or estimated from a\ngiven data set.\n\n**Scope:**\n\n- Simulation of the illness-death model with constant, Weibull or\n  piecewise constant transition hazards.\n- Conversion of the transition times to PFS and OS survival times.\n- Correlation between PFS and OS survival times can be calculated.\n\n**Main Features:**\n\n- Exponentially, Weibull and piecewise exponentially distributed\n  survival times.\n- Random censoring and event-driven censoring after a pre-specified\n  number of PFS or OS events.\n- Arbitrary number of treatment arms and flexible randomization ratio.\n- Staggered study entry.\n- Derivation of PFS and OS survival functions from transition hazards.\n- Correlation between PFS and OS can be estimated from a given data set.\n\n## Installation\n\n### Release\n\nYou can install the current release version from *CRAN* with:\n\n``` r\ninstall.packages(\"simIDM\")\n```\n\n### Development\n\nYou can install the current development version from *GitHub* with:\n\n``` r\nif (!require(\"remotes\")) {\n  install.packages(\"remotes\")\n}\nremotes::install_github(\"insightsengineering/simIDM\")\n```\n\n## Getting Started\n\nSee also the [quick\nstart](https://insightsengineering.github.io/simIDM/main/articles/quickstart.html)\nvignette or get started by trying out this example:\n\n``` r\nlibrary(simIDM)\ntransitionGroup1 \u003c- exponential_transition(h01 = 1.2, h02 = 1.5, h12 = 1.6)\ntransitionGroup2 \u003c- exponential_transition(h01 = 1, h02 = 1.3, h12 = 1.7)\n\nsimStudies \u003c- getClinicalTrials(\n  nRep = 100, nPat = c(50, 50), seed = 1234, datType = \"1rowPatient\",\n  transitionByArm = list(transitionGroup1, transitionGroup2), dropout = list(rate = 0.1, time = 12),\n  accrual = list(param = \"intensity\", value = 12)\n)\n```\n\nWe get as output a list with `nRep` elements, each containing a data set\nof a single simulated trial.\n\n``` r\nhead(simStudies[[1]])\n#\u003e   id trt    PFStime CensoredPFS PFSevent    OStime CensoredOS OSevent\n#\u003e 1  1   1 0.08087899           0        1 2.0330026          0       1\n#\u003e 2  2   1 0.84758881           0        1 0.8475888          0       1\n#\u003e 3  3   1 0.18276912           0        1 0.1968048          0       1\n#\u003e 4  4   1 0.13789870           0        1 1.2899802          0       1\n#\u003e 5  5   1 0.06458797           0        1 0.6901351          0       1\n#\u003e 6  6   1 0.83894555           0        1 1.0709457          0       1\n#\u003e   recruitTime OStimeCal PFStimeCal\n#\u003e 1   0.8516769  2.884679  0.9325558\n#\u003e 2   4.1068045  4.954393  4.9543933\n#\u003e 3   2.3596282  2.556433  2.5423973\n#\u003e 4   1.1682298  2.458210  1.3061285\n#\u003e 5   0.7710655  1.461201  0.8356535\n#\u003e 6   3.1585892  4.229535  3.9975347\n```\n\n## Citing `simIDM`\n\nTo cite `simIDM` please see\n[here](https://insightsengineering.github.io/simIDM/main/authors.html#citation).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Finsightsengineering%2Fsimidm","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Finsightsengineering%2Fsimidm","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Finsightsengineering%2Fsimidm/lists"}