{"id":18296964,"url":"https://github.com/contefranz/msmtools","last_synced_at":"2025-04-05T12:32:12.893Z","repository":{"id":56935080,"uuid":"57120803","full_name":"contefranz/msmtools","owner":"contefranz","description":"msmtools introduces a fast and general method for restructuring classical longitudinal datasets into augmented ones. ","archived":false,"fork":false,"pushed_at":"2024-08-29T13:59:53.000Z","size":3482,"stargazers_count":9,"open_issues_count":6,"forks_count":5,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-21T04:41:31.257Z","etag":null,"topics":["markov-model","msm","multi-state-models","r-package","survival-analysis","time-to-event"],"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/contefranz.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":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2016-04-26T10:52:54.000Z","updated_at":"2025-03-14T02:00:30.000Z","dependencies_parsed_at":"2024-11-05T14:59:30.436Z","dependency_job_id":null,"html_url":"https://github.com/contefranz/msmtools","commit_stats":{"total_commits":128,"total_committers":3,"mean_commits":"42.666666666666664","dds":0.3515625,"last_synced_commit":"6788523ad2d7f749771d2d290c64dfb05b533984"},"previous_names":[],"tags_count":11,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/contefranz%2Fmsmtools","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/contefranz%2Fmsmtools/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/contefranz%2Fmsmtools/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/contefranz%2Fmsmtools/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/contefranz","download_url":"https://codeload.github.com/contefranz/msmtools/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247339022,"owners_count":20923004,"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":["markov-model","msm","multi-state-models","r-package","survival-analysis","time-to-event"],"created_at":"2024-11-05T14:45:05.148Z","updated_at":"2025-04-05T12:32:10.555Z","avatar_url":"https://github.com/contefranz.png","language":"R","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Building augmented data for multi-state models: the `msmtools` package\n\n[![lifecycle](https://lifecycle.r-lib.org/articles/figures/lifecycle-maturing.svg)](https://lifecycle.r-lib.org/articles/stages.html)\n[![release](https://img.shields.io/badge/dev.%20version-2.0.1-blue)](https://github.com/contefranz/msmtools)\n[![CRAN\\_Status\\_Badge](https://www.r-pkg.org/badges/version/msmtools)](https://cran.r-project.org/package=msmtools)\n\n***\n\n**msmtools** introduces a fast and general method for restructuring classical \nlongitudinal datasets into *augmented* ones. The reason for this is to \nfacilitate the modeling of longitudinal data under a multi-state framework \nusing the **msm** package.\n\n## Installation\n\n``` r\n# Install the released version from CRAN:\ninstall.packages(\"msmtools\")\n\n# Install the development version from GitHub:\ndevtools::install_github(\"contefranz/msmtools\")\n```\n\n## Overview\n\n**msmtools** comes with 4 functions: \n\n* `augment()`: the main function of the package. This is the workhorse which \ntakes care of the data reshaping. It is very efficient and fast so highly \ndimensional datasets can be processed with ease;\n\n* `polish()`: it helps in find and remove those transition which occur at the \nsame time but lead to different states within a given subject;\n\n* `prevplot()`: this is a plotting function which mimics the usage of `msm()` \nfunction `plot.prevalence.msm()`, but with more things. Once you ran a \nmulti-state model, use this function to plot a comparison between observed and \nexpected prevalences;\n\n* `survplot()`: the aims of this function are double. You can use `survplot()` \nas a plotting tool for comparing the empirical and the fitted survival curves. \nOr you can use it to build and get the datasets used for the plot. \nThe function is based on **msm** `plot.survfit.msm()`, but does more things and \nit is considerably faster.\n\nFor more information about **msmtools**, please check out the vignette with \n`vignette( \"msmtools\" )`.\n\nBugs and issues can be reported at\n[https://github.com/contefranz/msmtools/issues](https://github.com/contefranz/msmtools/issues).\n\n## Breaking changes from version 2.0.0\n\n**msmtools** has received a lot of improvements in the plotting functions. In particular, from\nversion 2.0.0 both `survplot()` and `prevplot()` support [**ggplot2**](https://ggplot2.tidyverse.org). \nThis inevitably introduces\nseveral breaking changes. Overall, both functions have been greatly simplified, but I encourage\nto go over each function's documentation and the vignette to get a correct understanding on how they\nwork.\n\n***\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcontefranz%2Fmsmtools","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcontefranz%2Fmsmtools","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcontefranz%2Fmsmtools/lists"}