msmtools

msmtools introduces a fast and general method for restructuring classical longitudinal datasets into augmented ones.

https://github.com/contefranz/msmtools

Science Score: 13.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
  • DOI references
  • Academic publication links
  • Committers with academic emails
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (13.1%) to scientific vocabulary

Keywords

markov-model msm multi-state-models r-package survival-analysis time-to-event
Last synced: 6 months ago · JSON representation

Repository

msmtools introduces a fast and general method for restructuring classical longitudinal datasets into augmented ones.

Basic Info
  • Host: GitHub
  • Owner: contefranz
  • Language: R
  • Default Branch: main
  • Homepage:
  • Size: 3.32 MB
Statistics
  • Stars: 9
  • Watchers: 1
  • Forks: 5
  • Open Issues: 6
  • Releases: 9
Topics
markov-model msm multi-state-models r-package survival-analysis time-to-event
Created almost 10 years ago · Last pushed over 1 year ago
Metadata Files
Readme Changelog

README.md

Building augmented data for multi-state models: the msmtools package

lifecycle release CRAN\_Status\_Badge


msmtools introduces a fast and general method for restructuring classical longitudinal datasets into augmented ones. The reason for this is to facilitate the modeling of longitudinal data under a multi-state framework using the msm package.

Installation

``` r

Install the released version from CRAN:

install.packages("msmtools")

Install the development version from GitHub:

devtools::install_github("contefranz/msmtools") ```

Overview

msmtools comes with 4 functions:

  • augment(): the main function of the package. This is the workhorse which takes care of the data reshaping. It is very efficient and fast so highly dimensional datasets can be processed with ease;

  • polish(): it helps in find and remove those transition which occur at the same time but lead to different states within a given subject;

  • prevplot(): this is a plotting function which mimics the usage of msm() function plot.prevalence.msm(), but with more things. Once you ran a multi-state model, use this function to plot a comparison between observed and expected prevalences;

  • survplot(): the aims of this function are double. You can use survplot() as a plotting tool for comparing the empirical and the fitted survival curves. Or you can use it to build and get the datasets used for the plot. The function is based on msm plot.survfit.msm(), but does more things and it is considerably faster.

For more information about msmtools, please check out the vignette with vignette( "msmtools" ).

Bugs and issues can be reported at https://github.com/contefranz/msmtools/issues.

Breaking changes from version 2.0.0

msmtools has received a lot of improvements in the plotting functions. In particular, from version 2.0.0 both survplot() and prevplot() support ggplot2. This inevitably introduces several breaking changes. Overall, both functions have been greatly simplified, but I encourage to go over each function's documentation and the vignette to get a correct understanding on how they work.


Owner

  • Name: Francesco Grossetti
  • Login: contefranz
  • Kind: user
  • Location: Milan, Italy
  • Company: Bocconi University

Assistant Professor @ Bocconi University | NLP | Computer Vision | Statistics for Accounting and Finance

GitHub Events

Total
  • Issues event: 1
  • Watch event: 1
Last Year
  • Issues event: 1
  • Watch event: 1

Committers

Last synced: over 2 years ago

All Time
  • Total Commits: 128
  • Total Committers: 3
  • Avg Commits per committer: 42.667
  • Development Distribution Score (DDS): 0.352
Past Year
  • Commits: 0
  • Committers: 0
  • Avg Commits per committer: 0.0
  • Development Distribution Score (DDS): 0.0
Top Committers
Name Email Commits
Francesco Grossetti c****z@g****m 83
Francesco Grossetti f****i@p****t 35
Francesco Grossetti f****i@u****t 10
Committer Domains (Top 20 + Academic)

Issues and Pull Requests

Last synced: over 1 year ago

All Time
  • Total issues: 7
  • Total pull requests: 2
  • Average time to close issues: 3 days
  • Average time to close pull requests: about 1 month
  • Total issue authors: 3
  • Total pull request authors: 1
  • Average comments per issue: 1.0
  • Average comments per pull request: 3.0
  • Merged pull requests: 1
  • Bot issues: 0
  • Bot pull requests: 0
Past Year
  • Issues: 0
  • Pull requests: 2
  • Average time to close issues: N/A
  • Average time to close pull requests: about 1 month
  • Issue authors: 0
  • Pull request authors: 1
  • Average comments per issue: 0
  • Average comments per pull request: 3.0
  • Merged pull requests: 1
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
  • contefranz (5)
  • GiulianaLocatelli (1)
  • Thossapon (1)
  • camcaan (1)
Pull Request Authors
  • ColeMiller1 (4)
Top Labels
Issue Labels
enhancement (4) internal consistency (1) bug (1)
Pull Request Labels

Packages

  • Total packages: 1
  • Total downloads:
    • cran 1,349 last-month
  • Total docker downloads: 43,390
  • Total dependent packages: 0
  • Total dependent repositories: 0
  • Total versions: 6
  • Total maintainers: 1
cran.r-project.org: msmtools

Building Augmented Data to Run Multi-State Models with 'msm' Package

  • Versions: 6
  • Dependent Packages: 0
  • Dependent Repositories: 0
  • Downloads: 1,349 Last month
  • Docker Downloads: 43,390
Rankings
Forks count: 14.9%
Downloads: 22.3%
Stargazers count: 22.5%
Average: 25.0%
Dependent packages count: 29.8%
Dependent repos count: 35.5%
Last synced: 11 months ago

Dependencies

DESCRIPTION cran
  • R >= 3.0 depends
  • data.table >= 1.9.6 imports
  • ggplot2 >= 3.3.3 imports
  • msm >= 1.6 imports
  • patchwork >= 1.1.1 imports
  • scales >= 1.1.1 imports
  • survival >= 2.38.0 imports
  • knitr * suggests
  • rmarkdown * suggests
  • roxygen2 * suggests
  • testthat * suggests
  • usethis * suggests