{"id":32200755,"url":"https://github.com/ellessenne/rsimsum","last_synced_at":"2025-10-22T03:55:36.458Z","repository":{"id":48929758,"uuid":"92379170","full_name":"ellessenne/rsimsum","owner":"ellessenne","description":" Analysis of simulation studies including Monte Carlo error","archived":false,"fork":false,"pushed_at":"2024-05-16T12:35:58.000Z","size":72125,"stargazers_count":30,"open_issues_count":6,"forks_count":7,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-10-10T18:09:52.747Z","etag":null,"topics":["biostatistics","monte-carlo-error","r","rstats","simulation","simulation-study","simulations","statistics"],"latest_commit_sha":null,"homepage":"https://ellessenne.github.io/rsimsum/","language":"R","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ellessenne.png","metadata":{"files":{"readme":"README.Rmd","changelog":"NEWS.md","contributing":".github/CONTRIBUTING.md","funding":null,"license":"LICENSE.md","code_of_conduct":".github/CODE_OF_CONDUCT.md","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,"zenodo":null}},"created_at":"2017-05-25T07:52:21.000Z","updated_at":"2025-05-22T01:52:31.000Z","dependencies_parsed_at":"2023-12-26T09:03:14.477Z","dependency_job_id":"77504924-31a3-4b89-8765-f68073676c05","html_url":"https://github.com/ellessenne/rsimsum","commit_stats":{"total_commits":589,"total_committers":10,"mean_commits":58.9,"dds":0.502546689303905,"last_synced_commit":"58945b48261aeee6ef6c6bb3f775f0a6e1a4a3b7"},"previous_names":[],"tags_count":38,"template":false,"template_full_name":null,"purl":"pkg:github/ellessenne/rsimsum","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ellessenne%2Frsimsum","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ellessenne%2Frsimsum/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ellessenne%2Frsimsum/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ellessenne%2Frsimsum/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ellessenne","download_url":"https://codeload.github.com/ellessenne/rsimsum/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ellessenne%2Frsimsum/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279020650,"owners_count":26086898,"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-14T02:00:06.444Z","response_time":60,"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":["biostatistics","monte-carlo-error","r","rstats","simulation","simulation-study","simulations","statistics"],"created_at":"2025-10-22T03:55:32.107Z","updated_at":"2025-10-22T03:55:36.453Z","avatar_url":"https://github.com/ellessenne.png","language":"R","funding_links":[],"categories":[],"sub_categories":[],"readme":"---\noutput: github_document\neditor_options:\n  chunk_output_type: console\n---\n\n\u003c!-- README.md is generated from README.Rmd. Please edit that file --\u003e\n\n```{r, echo = FALSE}\nknitr::opts_chunk$set(\n  collapse = TRUE,\n  comment = \"#\u003e\",\n  fig.path = \"man/figures/README-\",\n  fig.align = \"center\",\n  fig.height = 4.5,\n  fig.width = 6.5,\n  out.width = \"85%\",\n  dpi = 200\n)\noptions(width = 100)\n```\n\n# {rsimsum}: Analysis of Simulation Studies Including Monte Carlo Error \u003cimg src=\"man/figures/hex.png\" width = \"200\" align=\"right\" /\u003e\n\n\u003c!-- badges: start --\u003e\n[![R-CMD-check](https://github.com/ellessenne/rsimsum/actions/workflows/R-CMD-check.yaml/badge.svg)](https://github.com/ellessenne/rsimsum/actions/workflows/R-CMD-check.yaml)\n[![Codecov Test Coverage](https://codecov.io/gh/ellessenne/rsimsum/branch/master/graph/badge.svg)](https://app.codecov.io/gh/ellessenne/rsimsum?branch=master)\n[![CRAN Status](https://www.r-pkg.org/badges/version/rsimsum)](https://CRAN.R-project.org/package=rsimsum)\n[![CRAN Logs Monthly Downloads](https://cranlogs.r-pkg.org/badges/rsimsum)](https://CRAN.R-project.org/package=rsimsum)\n[![CRAN Logs Total Downloads](https://cranlogs.r-pkg.org/badges/grand-total/rsimsum)](https://CRAN.R-project.org/package=rsimsum)\n[![JOSS DOI](https://joss.theoj.org/papers/10.21105/joss.00739/status.svg)](https://doi.org/10.21105/joss.00739)\n[![Lifecycle: Stable](https://img.shields.io/badge/lifecycle-stable-brightgreen.svg)](https://lifecycle.r-lib.org/articles/stages.html#stable)\n\u003c!-- badges: end --\u003e\n\n`rsimsum` is an R package that can compute summary statistics from simulation studies. `rsimsum` is modelled upon a similar package available in Stata, the user-written command `simsum` (White I.R., 2010).\n\nThe aim of `rsimsum` is to help to report simulation studies, including understanding the role of chance in results of simulation studies: Monte Carlo standard errors and confidence intervals based on them are computed and presented to the user by default. `rsimsum` can compute a wide variety of summary statistics: bias, empirical and model-based standard errors, relative precision, relative error in model standard error, mean squared error, coverage, bias. Further details on each summary statistic are presented elsewhere (White I.R., 2010; Morris _et al_, 2019).\n\nThe main function of `rsimsum` is called `simsum` and can handle simulation studies with a single estimand of interest at a time. Missing values are excluded by default, and it is possible to define boundary values to drop estimated values or standard errors exceeding such limits. It is possible to define a variable representing methods compared with the simulation study, and it is possible to define _by_ factors, that is, factors that vary between the different simulated scenarios (data-generating mechanisms, DGMs). However, methods and DGMs are not strictly required: in that case, a simulation study with a single scenario and a single method is assumed. Finally, `rsimsum` provides a function named `multisimsum` that allows summarising simulation studies with multiple estimands as well.\n\nAn important step of reporting a simulation study consists in visualising the results; therefore, `rsimsum` exploits the R package [`ggplot2`](https://CRAN.R-project.org/package=ggplot2) to produce a portfolio of opinionated data visualisations for quick exploration of results, inferring colours and facetting by data-generating mechanisms. `rsimsum` includes methods to produce (1) plots of summary statistics with confidence intervals based on Monte Carlo standard errors (forest plots, lolly plots), (2) zipper plots to graphically visualise coverage by directly plotting confidence intervals, (3) plots for method-wise comparisons of estimates and standard errors (scatter plots, Bland-Altman plots, ridgeline plots), and (4) heat plots. The latter is a visualisation type that has not been traditionally used to present results of simulation studies, and consists in a mosaic plot where the factor on the x-axis is the methods compared with the current simulation study and the factor on the y-axis is the data-generating factors. Each tile of the mosaic plot is coloured according to the value of the summary statistic of interest, with a red colour representing values above the target value and a blue colour representing values below the target.\n\n## Installation\n\nYou can install `rsimsum` from CRAN:\n\n```{r cran-installation, eval = FALSE}\ninstall.packages(\"rsimsum\")\n```\n\nAlternatively, it is possible to install the development version from GitHub using the `remotes` package:\n\n```{r gh-installation, eval = FALSE}\n# install.packages(\"remotes\")\nremotes::install_github(\"ellessenne/rsimsum\")\n```\n\n## Example\n\nThis is a basic example using data from a simulation study on missing data (type `help(\"MIsim\", package = \"rsimsum\")` in the R console for more information):\n\n```{r simsum}\nlibrary(rsimsum)\ndata(\"MIsim\", package = \"rsimsum\")\ns \u003c- simsum(data = MIsim, estvarname = \"b\", true = 0.5, se = \"se\", methodvar = \"method\", x = TRUE)\ns\n```\n\nWe set `x = TRUE` as it will be required for some plot types.\n\nSummarising the results:\n\n```{r summary}\nsummary(s)\n```\n\n## Vignettes\n\n`rsimsum` comes with 5 vignettes. In particular, check out the introductory one:\n\n```r\nvignette(topic = \"A-introduction\", package = \"rsimsum\")\n```\n\nThe list of vignettes could be obtained by typing the following in the R console:\n\n```r\nvignette(package = \"rsimsum\")\n```\n\n## Visualising results\n\nAs of version `0.2.0`, `rsimsum` can produce a variety of plots: among others, lolly plots, forest plots, zipper plots, etc.:\n\n```{r lolly}\nlibrary(ggplot2)\nautoplot(s, type = \"lolly\", stats = \"bias\")\n```\n\n```{r zipper}\nautoplot(s, type = \"zip\")\n```\n\nWith `rsimsum` `0.5.0` the plotting functionality has been completely rewritten, and new plot types have been implemented:\n\n* Scatter plots for method-wise comparisons, including Bland-Altman type plots;\n\n```{r ba}\nautoplot(s, type = \"est_ba\")\n```\n\n* Ridgeline plots.\n\n```{r ridgeline}\nautoplot(s, type = \"est_ridge\")\n```\n\nNested loop plots have been implemented in `rsimsum` `0.6.0`:\n\n```{r nlp}\ndata(\"nlp\", package = \"rsimsum\")\ns.nlp \u003c- rsimsum::simsum(\n  data = nlp, estvarname = \"b\", true = 0, se = \"se\",\n  methodvar = \"model\", by = c(\"baseline\", \"ss\", \"esigma\")\n)\nautoplot(s.nlp, stats = \"bias\", type = \"nlp\")\n```\n\nFinally, as of `rsimsum` `0.7.1` contour plots and hexbin plots have been implemented as well:\n\n```{r density}\nautoplot(s, type = \"est_density\")\n```\n\n```{r hex}\nautoplot(s, type = \"est_hex\")\n```\n\nThey provide a useful alternative when there are several data points with large overlap (e.g. in a scatterplot).\n\nThe plotting functionality now extend the S3 generic `autoplot`: see `?ggplot2::autoplot` and `?rsimsum::autoplot.simsum` for further details.\n\nMore details and information can be found in the vignettes dedicated to plotting:\n\n```{r vignette-plotting, eval = FALSE}\nvignette(topic = \"C-plotting\", package = \"rsimsum\")\nvignette(topic = \"D-nlp\", package = \"rsimsum\")\n```\n\n# Citation\n\nIf you find `rsimsum` useful, please cite it in your publications:\n\n```{r citation}\ncitation(\"rsimsum\")\n```\n\n# References\n\n* White, I.R. 2010. _simsum: Analyses of simulation studies including Monte Carlo error_. The Stata Journal, 10(3): 369-385\n* Morris, T.P., White, I.R. and Crowther, M.J. 2019. _Using simulation studies to evaluate statistical methods_. Statistics in Medicine, 38: 2074-2102\n* Gasparini, A. 2018. _rsimsum: Summarise results from Monte Carlo simulation studies_. Journal of Open Source Software, 3(26):739\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fellessenne%2Frsimsum","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fellessenne%2Frsimsum","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fellessenne%2Frsimsum/lists"}