rsimsum
rsimsum: Summarise results from Monte Carlo simulation studies - Published in JOSS (2018)
Science Score: 95.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
Found .zenodo.json file -
✓DOI references
Found 4 DOI reference(s) in README and JOSS metadata -
✓Academic publication links
Links to: joss.theoj.org -
✓Committers with academic emails
2 of 7 committers (28.6%) from academic institutions -
○Institutional organization owner
-
✓JOSS paper metadata
Published in Journal of Open Source Software
Keywords
biostatistics
monte-carlo-error
r
rstats
simulation
simulation-study
simulations
statistics
Scientific Fields
Physics
Physical Sciences -
40% confidence
Last synced: 4 months ago
·
JSON representation
Repository
Analysis of simulation studies including Monte Carlo error
Basic Info
- Host: GitHub
- Owner: ellessenne
- License: gpl-3.0
- Language: R
- Default Branch: master
- Homepage: https://ellessenne.github.io/rsimsum/
- Size: 68.8 MB
Statistics
- Stars: 30
- Watchers: 2
- Forks: 7
- Open Issues: 6
- Releases: 2
Topics
biostatistics
monte-carlo-error
r
rstats
simulation
simulation-study
simulations
statistics
Created over 8 years ago
· Last pushed over 1 year ago
Metadata Files
Readme
Changelog
Contributing
License
Code of conduct
README.Rmd
---
output: github_document
editor_options:
chunk_output_type: console
---
```{r, echo = FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>",
fig.path = "man/figures/README-",
fig.align = "center",
fig.height = 4.5,
fig.width = 6.5,
out.width = "85%",
dpi = 200
)
options(width = 100)
```
# {rsimsum}: Analysis of Simulation Studies Including Monte Carlo Error
[](https://github.com/ellessenne/rsimsum/actions/workflows/R-CMD-check.yaml)
[](https://app.codecov.io/gh/ellessenne/rsimsum?branch=master)
[](https://CRAN.R-project.org/package=rsimsum)
[](https://CRAN.R-project.org/package=rsimsum)
[](https://CRAN.R-project.org/package=rsimsum)
[](https://doi.org/10.21105/joss.00739)
[](https://lifecycle.r-lib.org/articles/stages.html#stable)
`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).
The 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).
The 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.
An 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.
## Installation
You can install `rsimsum` from CRAN:
```{r cran-installation, eval = FALSE}
install.packages("rsimsum")
```
Alternatively, it is possible to install the development version from GitHub using the `remotes` package:
```{r gh-installation, eval = FALSE}
# install.packages("remotes")
remotes::install_github("ellessenne/rsimsum")
```
## Example
This 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):
```{r simsum}
library(rsimsum)
data("MIsim", package = "rsimsum")
s <- simsum(data = MIsim, estvarname = "b", true = 0.5, se = "se", methodvar = "method", x = TRUE)
s
```
We set `x = TRUE` as it will be required for some plot types.
Summarising the results:
```{r summary}
summary(s)
```
## Vignettes
`rsimsum` comes with 5 vignettes. In particular, check out the introductory one:
```r
vignette(topic = "A-introduction", package = "rsimsum")
```
The list of vignettes could be obtained by typing the following in the R console:
```r
vignette(package = "rsimsum")
```
## Visualising results
As of version `0.2.0`, `rsimsum` can produce a variety of plots: among others, lolly plots, forest plots, zipper plots, etc.:
```{r lolly}
library(ggplot2)
autoplot(s, type = "lolly", stats = "bias")
```
```{r zipper}
autoplot(s, type = "zip")
```
With `rsimsum` `0.5.0` the plotting functionality has been completely rewritten, and new plot types have been implemented:
* Scatter plots for method-wise comparisons, including Bland-Altman type plots;
```{r ba}
autoplot(s, type = "est_ba")
```
* Ridgeline plots.
```{r ridgeline}
autoplot(s, type = "est_ridge")
```
Nested loop plots have been implemented in `rsimsum` `0.6.0`:
```{r nlp}
data("nlp", package = "rsimsum")
s.nlp <- rsimsum::simsum(
data = nlp, estvarname = "b", true = 0, se = "se",
methodvar = "model", by = c("baseline", "ss", "esigma")
)
autoplot(s.nlp, stats = "bias", type = "nlp")
```
Finally, as of `rsimsum` `0.7.1` contour plots and hexbin plots have been implemented as well:
```{r density}
autoplot(s, type = "est_density")
```
```{r hex}
autoplot(s, type = "est_hex")
```
They provide a useful alternative when there are several data points with large overlap (e.g. in a scatterplot).
The plotting functionality now extend the S3 generic `autoplot`: see `?ggplot2::autoplot` and `?rsimsum::autoplot.simsum` for further details.
More details and information can be found in the vignettes dedicated to plotting:
```{r vignette-plotting, eval = FALSE}
vignette(topic = "C-plotting", package = "rsimsum")
vignette(topic = "D-nlp", package = "rsimsum")
```
# Citation
If you find `rsimsum` useful, please cite it in your publications:
```{r citation}
citation("rsimsum")
```
# References
* White, I.R. 2010. _simsum: Analyses of simulation studies including Monte Carlo error_. The Stata Journal, 10(3): 369-385
* Morris, T.P., White, I.R. and Crowther, M.J. 2019. _Using simulation studies to evaluate statistical methods_. Statistics in Medicine, 38: 2074-2102
* Gasparini, A. 2018. _rsimsum: Summarise results from Monte Carlo simulation studies_. Journal of Open Source Software, 3(26):739
Owner
- Name: Alessandro Gasparini
- Login: ellessenne
- Kind: user
- Location: Stockholm, Sweden
- Company: @RedDoorAnalytics
- Website: https://www.ellessenne.xyz
- Twitter: ellessenne
- Repositories: 9
- Profile: https://github.com/ellessenne
Senior biostatistician, #rstats developer, data aficionado, outdoor enthusiast, pizza fanatic.
JOSS Publication
rsimsum: Summarise results from Monte Carlo simulation studies
Published
June 20, 2018
Volume 3, Issue 26, Page 739
Authors
Tags
Monte Carlo simulation study simulation biostatisticsGitHub Events
Total
- Issues event: 1
- Watch event: 4
- Issue comment event: 3
Last Year
- Issues event: 1
- Watch event: 4
- Issue comment event: 3
Committers
Last synced: 5 months ago
Top Committers
| Name | Commits | |
|---|---|---|
| Alessandro Gasparini | e****e@g****m | 419 |
| Alessandro Gasparini | a****5@l****k | 154 |
| Alessandro Gasparini | a****5@l****k | 29 |
| lorenzo-guizzaro | 7****o | 1 |
| Samuel Perreault | s****3@u****a | 1 |
| Michel Lang | m****g@g****m | 1 |
| Kaladani | 8****i | 1 |
Committer Domains (Top 20 + Academic)
Issues and Pull Requests
Last synced: 4 months ago
All Time
- Total issues: 42
- Total pull requests: 17
- Average time to close issues: 3 months
- Average time to close pull requests: 28 days
- Total issue authors: 9
- Total pull request authors: 5
- Average comments per issue: 1.5
- Average comments per pull request: 0.71
- Merged pull requests: 17
- Bot issues: 0
- Bot pull requests: 0
Past Year
- Issues: 2
- Pull requests: 0
- Average time to close issues: N/A
- Average time to close pull requests: N/A
- Issue authors: 2
- Pull request authors: 0
- Average comments per issue: 1.5
- Average comments per pull request: 0
- Merged pull requests: 0
- Bot issues: 0
- Bot pull requests: 0
Top Authors
Issue Authors
- ellessenne (29)
- lebebr01 (4)
- mikesweeting (3)
- ilovemane (1)
- edbonneville (1)
- MvanSmeden (1)
- remlapmot (1)
- LaurenSamuels (1)
- ge-li (1)
Pull Request Authors
- ellessenne (13)
- samperochkin (1)
- lorenzo-guizzaro (1)
- mllg (1)
- Kaladani (1)
Top Labels
Issue Labels
enhancement (14)
bug (5)
Pull Request Labels
Packages
- Total packages: 1
-
Total downloads:
- cran 390 last-month
- Total dependent packages: 0
- Total dependent repositories: 1
- Total versions: 21
- Total maintainers: 1
cran.r-project.org: rsimsum
Analysis of Simulation Studies Including Monte Carlo Error
- Homepage: https://ellessenne.github.io/rsimsum/
- Documentation: http://cran.r-project.org/web/packages/rsimsum/rsimsum.pdf
- License: GPL (≥ 3)
-
Latest release: 0.13.0
published almost 2 years ago
Rankings
Forks count: 9.7%
Stargazers count: 11.0%
Average: 18.5%
Downloads: 19.5%
Dependent repos count: 24.3%
Dependent packages count: 27.9%
Maintainers (1)
Last synced:
4 months ago
Dependencies
DESCRIPTION
cran
- R >= 2.10 depends
- checkmate * imports
- generics * imports
- ggplot2 * imports
- ggridges * imports
- knitr * imports
- lifecycle * imports
- rlang >= 0.4.0 imports
- scales * imports
- stats * imports
- covr * suggests
- devtools * suggests
- dplyr * suggests
- eha * suggests
- rmarkdown * suggests
- rstpm2 * suggests
- survival * suggests
- testthat * suggests
- usethis * suggests
.github/workflows/R-CMD-check.yaml
actions
- actions/cache v2 composite
- actions/checkout v2 composite
- actions/upload-artifact main composite
- r-lib/actions/setup-pandoc v1 composite
- r-lib/actions/setup-r v1 composite
.github/workflows/pr-commands.yaml
actions
- actions/checkout v2 composite
- r-lib/actions/pr-fetch v1 composite
- r-lib/actions/pr-push v1 composite
- r-lib/actions/setup-r v1 composite
.github/workflows/test-coverage.yaml
actions
- actions/cache v2 composite
- actions/checkout v2 composite
- r-lib/actions/setup-pandoc v1 composite
- r-lib/actions/setup-r v1 composite
