specr

Conducting and Visualizing Specification Curve Analyses

https://github.com/masurp/specr

Science Score: 46.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
    Found 42 DOI reference(s) in README
  • Academic publication links
    Links to: springer.com, wiley.com
  • Committers with academic emails
    7 of 10 committers (70.0%) from academic institutions
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (20.4%) to scientific vocabulary

Keywords

multiverse r rstats specification-curve
Last synced: 6 months ago · JSON representation

Repository

Conducting and Visualizing Specification Curve Analyses

Basic Info
Statistics
  • Stars: 68
  • Watchers: 4
  • Forks: 5
  • Open Issues: 5
  • Releases: 7
Topics
multiverse r rstats specification-curve
Created over 6 years ago · Last pushed over 1 year ago
Metadata Files
Readme Contributing License Code of conduct

README.Rmd

---
output: github_document
---



```{r, include = FALSE}
knitr::opts_chunk$set(
  collapse = TRUE,
  comment = "#>",
  fig.path = "man/figures/README-",
  out.width = "100%",
  fig.retina = 2
)
```


# specr ## Conducting and Visualizing Specification Curve Analyses [![CRAN status](https://www.r-pkg.org/badges/version/specr)](https://CRAN.R-project.org/package=specr) ![CRAN downloads](https://cranlogs.r-pkg.org/badges/grand-total/specr) [![Lifecycle: stable](https://lifecycle.r-lib.org/articles/figures/lifecycle-stable.svg)](https://lifecycle.r-lib.org/articles/stages.html#stable) [![R-CMD-check](https://github.com/masurp/specr/actions/workflows/R-CMD-check.yaml/badge.svg)](https://github.com/masurp/specr/actions/workflows/R-CMD-check.yaml) ### News - 22 May 2024: The new development version (specr version 1.0.1) includes new functions to conduct inferences on the specification curve analysis (the third step outlined Simohnsohn et al., 2020). See [this vignette](https://masurp.github.io/specr/articles/inferences.html) for further details. - 20 January 2022: specr version 1.0.0 is now available via [CRAN](https://cran.r-project.org/package=specr). This is a major update with several new features and functions. Note: it introduces a new framework for conduction specification curve analyses compared to earlier versions (see [version history](https://masurp.github.io/specr/news/index.html) for more details). - 4 December 2020: specr development version 0.2.2 is available via github. Mostly minor updates and bug fixes. - 25 May 2020: specr version 0.2.1 has been released on CRAN. ### What is specr? The goal of specr is to facilitate specification curve analyses (Simonsohn, Simmons & Nelson, 2020; also known as multiverse analyses, see Steegen, Tuerlinckx, Gelman & Vanpaemel, 2016). The package can be used to investigate how different (theoretically plausible) analytical choices affect outcome statistics within the universe of one single data set. It provides functions to setup, run, evaluate, and plot the multiverse of specifications. A simple example of how to use specr is provided below. For more information about the various functions and specific vignettes and use cases, visit the [documentation](https://masurp.github.io/specr/index.html). ### Disclaimer We do see a lot of value in investigating how analytical choices affect a statistical outcome of interest. However, we strongly caution against using `specr` as a tool to somehow arrive at a better estimate. Running a specification curve analysis does not make your findings any more reliable, valid or generalizable than a single analysis. The method is only meant to inform about the effects of analytical choices on results, and not a better way to estimate a correlation or effect. ### Installation Install specr from CRAN: ``` r install.packages("specr") ``` Or install the most recent development version from [GitHub](https://github.com/) with: ``` r # install.packages("devtools") devtools::install_github("masurp/specr") ``` ### Usage Using specr is comparatively simple. The two main function are `setup()`, in which analytic choices are specified as arguments, and `specr()`, which fits the models across all specifications. The latter creates a class called "specr.object", which can be summarized and plotted with generic function such as `summary` or `plot`. ```{r, message=F, warning = F, fig.height=10, fig.width=10} # Load package ---- library(specr) # Setup Specifications ---- specs <- setup(data = example_data, y = c("y1", "y2"), x = c("x1", "x2"), model = c("lm"), controls = c("c1", "c2"), subsets = list(group1 = unique(example_data$group1), group2 = unique(example_data$group2))) # Run Specification Curve Analysis ---- results <- specr(specs) # Plot Specification Curve ---- plot(results) ``` ### How to cite this package ```{r} citation("specr") ``` ### References - Simonsohn, U., Simmons, J.P. & Nelson, L.D. (2020). Specification curve analysis. *Nature Human Behaviour, 4*, 1208–1214. https://doi.org/10.1038/s41562-020-0912-z - Steegen, S., Tuerlinckx, F., Gelman, A., & Vanpaemel, W. (2016). Increasing Transparency Through a Multiverse Analysis. *Perspectives on Psychological Science*, 11(5), 702-712. https://doi.org/10.1177/1745691616658637 ### Other resources on multiverse/specification curve analyses The following papers and websites are interesting resources to explore the method further and learn about potential promises and pitfalls: - Good discussion of the multiverse analysis method: Del Giudice, M., & Gangestad, S. W. (2021). A traveler’s guide to the multiverse: Promises, pitfalls, and a framework for the evaluation of analytic decisions. *Advances in Methods and Practices in Psychological Science, 4*(1). https://journals.sagepub.com/doi/abs/10.1177/2515245920954925 - A systematic comparison of visualization techniques for multiverse analyses: Hall, B. D., Liu, Y., Jansen, Y., Dragicevic, P., Chevalier, F., & Kay, M. (2022,). A survey of tasks and visualizations in multiverse analysis reports. In *Computer Graphics Forum* (Vol. 41, No. 1, pp. 402-426).https://onlinelibrary.wiley.com/doi/abs/10.1111/cgf.14443 - Proposal to include data collection decisions as choices within the multiverse: Harder, J. A. (2020). The multiverse of methods: Extending the multiverse analysis to address data-collection decisions. *Perspectives on Psychological Science, 15*(5), 1158-1177. https://journals.sagepub.com/doi/abs/10.1177/1745691620917678 - Proposal on how the multiverse approach can be implemented in student research projects: Heyman, T., & Vanpaemel, W. (2022). Multiverse analyses in the classroom. *Meta-Psychology, 6.* https://open.lnu.se/index.php/metapsychology/article/view/2718 - Overview of different packages for specification curve/multiverse analysis: https://urisohn.com/specification-curve/ ### Papers that used 'specr' If you have published a paper in which you used `specr` and you would like to be included in the following list, please send an email to [Philipp](mailto:p.k.masur@vu.nl). - Akaliyski, P., Minkov, M., Li, J., Bond, M. H., & Gehring, S. (2022). The weight of culture: Societal individualism and flexibility explain large global variations in obesity. *Social Science & Medicine*, 307. https://doi.org/10.1016/j.socscimed.2022.115167 - Ballou, N., & van Rooij, A. J. (2021). The relationship between mental well-being and dysregulated gaming: a specification curve analysis of core and peripheral criteria in five gaming disorder scales. *The Royal Society Open Science.* https://doi.org/10.1098/rsos.201385 - Ballou, N., & Zendle, D. (2022). "Clinically significant distress" in internet gaming disorder: An individual participant meta-analysis. *Computers in Human Behavior, 129*. https://doi.org/10.1016/j.chb.2021.107140 - Burton, J.W., Cruz, N. & Hahn, U. (2021). Reconsidering evidence of moral contagion in online social networks. *Nature Human Behaviour.* https://doi.org/10.1038/s41562-021-01133-5 - Cantone, G. G., & Tomaselli, V. (2023). Theory and methods of the multiverse: an application for panel-based models. *Quality & Quantity*, 1-34. - Cantone, G. G., & Tomaselli, V. (2024). Characterisation and Calibration of Multiversal Models. Preprint: https://osf.io/download/6627aeecc5851a0791f66f6c/ - Cosme, D., & Lopez, R. B. (2023). Neural indicators of food cue reactivity, regulation, and valuation and their associations with body composition and daily eating behavior. Social Cognitive and Affective Neuroscience, 18(1). https://doi.org/10.1093/scan/nsaa155 - Del Giudice, M., & Gangestad, S. W. (2021). A Traveler’s Guide to the Multiverse: Promises, Pitfalls, and a Framework for the Evaluation of Analytic Decisions. *Advances in Methods and Practices in Psychological Science.* https://doi.org/10.1177/2515245920954925 - De Vries, I., Baglivio, M., & Reid, J. A. (2024). Examining individual and contextual correlates of victimization for juvenile human trafficking in Florida. *Journal of interpersonal violence*, 08862605241243332. https://journals.sagepub.com/doi/abs/10.1177/08862605241243332 - Haehner, P., Kritzler, S., & Luhmann, M. (2023). Can Perceived and Objective-Descriptive Event Characteristics Explain Individual Differences in Changes in Subjective Well-Being After Negative Life Events? A Specification Curve Analysis. - Henson, P., Rodriguez-Villa, E., Torous, J. (2021). Investigating Associations Between Screen Time and Symptomatology in Individuals With Serious Mental Illness: Longitudinal Observational Study *Journal of Medical Internet Research, 23*(3), e23144. https://doi.org/10.2196/23144 - Huang, S., Lai, X., Zhao, X., Dai, X., Yao, Y., Zhang, C., & Wang, Y., (2022). Beyond screen time: Exploring associations between types of smartphone use content and adolescents' social relationships. *International Journal of Environmental Research and Public Health, 19*, 8940. https://doi.org/10.3390/ijerph19158940 - Jones, A., Petrovskaya, E., & Stafford, T. (2024). Exploring the multiverse of analysis options for the alcohol Stroop. *Behavior Research Methods*, 1-11. https://link.springer.com/article/10.3758/s13428-024-02377-5 - Kleinert, M. (2024). Reconsidering the Relationship Between Anti-immigration Attitudes and Preferences for the AfD Using Implicit Attitudes Measures. *Politische Vierteljahresschrift, 65*(1), 71-98. - Kritzler, S., & Luhmann, M. (2021, March 25). Be Yourself and Behave Appropriately: Exploring Associations Between Incongruent Personality States and Positive Affect, Tiredness, and Cognitive Performance. https://doi.org/10.31234/osf.io/9utyj - Mao, Z. F., Li, Q. W., Wang, Y. M., & Zhou, J. (2024). Pro-religion attitude predicts lower vaccination coverage at country level. *Humanities and Social Sciences Communications, 11*(1), 1-9. - Masur, P. K. (2021). Understanding the Effects of Conceptual and Analytical Choices on ‘Finding’ the Privacy Paradox: A Specification Curve Analysis of Large-Scale Survey Data. *Information, Communication & Society.* https://doi.org/10.1080/1369118X.2021.1963460 - Masur, P. K., & Ranzini, G. (2024). Privacy Calculus, Privacy Paradox, and Context Collapse: A Replication of Three Key Studies in Communication Privacy Research. *SocArXiv.* https://osf.io/preprints/socarxiv/8tr2k - Prasad, S., Knight, E. L., Sarkar, A., Welker, K. M., Lassetter, B., & Mehta, P. H. (2021). Testosterone fluctuations in response to a democratic election predict partisan attitudes toward the elected leader. *Psychoneuroendocrinology, 133*, 105396. - Rauvola, R. S., & Rudolph, C. W. (2023). Worker aging, control, and well-being: A specification curve analysis. *Acta Psychologica, 233*. - Sekścińska, K., Jaworska, D., & Rudzinska‐Wojciechowska, J. (2024). The effect of state and trait power on financial risk taking: The mediating and moderating roles of focus on rewards versus threats. *Journal of Behavioral Decision Making, 37*(1), e2363. https://doi.org/10.1002/bdm.2363 - Tisdall, L., & Mata, R. (2023). Age differences in the neural basis of decision-making under uncertainty. *Cognitive, Affective, & Behavioral Neuroscience.* https://doi.org/10.3758/s13415-022-01060-6 - Tünte, M. R., Hoehl, S., Wunderwald, M., Bullinger, J., Boyadziheva, A., Maister, L., ... & Kayhan, E. (2023). Respiratory and Cardiac Interoceptive Sensitivity in the First Two Years of Life. *eLife, 12*. https://elifesciences.org/reviewed-preprints/91579 - van Veelen, H.P.J., Ibáñez-Álamo, J.D., Horrocks, N.P.C. et al. (2023). Cloacal microbiota are biogeographically structured in larks from desert, tropical and temperate areas. *BMC Microbiol 23*(40). https://doi.org/10.1186/s12866-023-02768-2 - Visontay, R., Mewton, L., Sunderland, M., Bell, S., Britton, A., Osman, B., ... & Slade, T. (2023). A comprehensive evaluation of the longitudinal association between alcohol consumption and a measure of inflammation: Multiverse and vibration of effects analyses. *Drug and Alcohol Dependence*, 247. https://doi.org/10.1016/j.drugalcdep.2023.109886 - Wang, Y., Pitre, T., Wallach, J. D., de Souza, R. J., Jassal, T., Bier, D., ... & Zeraatkar, D. (2024). Grilling the data: Application of specification curve analysis to red meat and all-cause mortality. *Journal of Clinical Epidemiology, 111278.* https://doi.org/10.1016/j.jclinepi.2024.111278 - Yu, R. P. (2024). Divides in News Verification: Antecedents and Political Outcomes of News Verification by Age. *Digital Journalism*, 1-21. https://www.tandfonline.com/doi/abs/10.1080/21670811.2024.2314582 - Yuan, Q., Li, H., Du, B., Dang, Q., Chang, Q., Zhang, Z., ... & Guo, T. (2023). The cerebellum and cognition: further evidence for its role in language control. *Cerebral Cortex, 33*(1), 35-49. https://doi.org/10.1093/cercor/bhac051

Owner

  • Name: Philipp K. Masur
  • Login: masurp
  • Kind: user
  • Location: Amsterdam
  • Company: Vrije Universiteit Amsterdam

Assistant Professor in the Department of Communication Science at the Vrije Universiteit Amsterdam.

GitHub Events

Total
  • Issues event: 2
  • Watch event: 1
  • Issue comment event: 1
Last Year
  • Issues event: 2
  • Watch event: 1
  • Issue comment event: 1

Committers

Last synced: over 2 years ago

All Time
  • Total Commits: 452
  • Total Committers: 10
  • Avg Commits per committer: 45.2
  • Development Distribution Score (DDS): 0.42
Past Year
  • Commits: 129
  • Committers: 1
  • Avg Commits per committer: 129.0
  • Development Distribution Score (DDS): 0.0
Top Committers
Name Email Commits
Philipp K. Masur p****r@u****e 262
masurp p****r@v****l 134
Philipp Masur p****r@e****E 19
Philipp Masur p****r@e****E 12
Philipp Masur p****r@e****E 7
Michael Scharkow m****l@u****g 5
Philipp Masur p****r@e****E 5
Philipp K. Masur p****r@u****e 3
ms ms@u****l 3
Philipp Masur p****r@P****n 2

Issues and Pull Requests

Last synced: 6 months ago

All Time
  • Total issues: 33
  • Total pull requests: 7
  • Average time to close issues: 6 months
  • Average time to close pull requests: 3 months
  • Total issue authors: 21
  • Total pull request authors: 4
  • Average comments per issue: 2.58
  • Average comments per pull request: 2.43
  • Merged pull requests: 3
  • Bot issues: 0
  • Bot pull requests: 0
Past Year
  • Issues: 1
  • Pull requests: 0
  • Average time to close issues: about 4 hours
  • Average time to close pull requests: N/A
  • Issue authors: 1
  • Pull request authors: 0
  • Average comments per issue: 1.0
  • Average comments per pull request: 0
  • Merged pull requests: 0
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
  • masurp (5)
  • maswiebe (4)
  • hp2500 (3)
  • al-joseph (2)
  • Toric-V (2)
  • mscharkow (2)
  • arranjdavis (1)
  • cbjrobertson (1)
  • apolussa (1)
  • LukasWallrich (1)
  • akarlinsky (1)
  • stuartjames1990 (1)
  • samuelpbateman (1)
  • dfatori (1)
  • karldw (1)
Pull Request Authors
  • masurp (4)
  • mvuorre (1)
  • apoorvalal (1)
  • cbjrobertson (1)
Top Labels
Issue Labels
enhancement (8) Does this answer your question? (5) bug (2) wontfix (1)
Pull Request Labels

Packages

  • Total packages: 1
  • Total downloads:
    • cran 272 last-month
  • Total dependent packages: 0
  • Total dependent repositories: 1
  • Total versions: 2
  • Total maintainers: 1
cran.r-project.org: specr

Conducting and Visualizing Specification Curve Analyses

  • Versions: 2
  • Dependent Packages: 0
  • Dependent Repositories: 1
  • Downloads: 272 Last month
Rankings
Stargazers count: 5.7%
Forks count: 9.6%
Average: 18.8%
Dependent repos count: 23.9%
Downloads: 26.3%
Dependent packages count: 28.7%
Maintainers (1)
Last synced: 6 months ago

Dependencies

DESCRIPTION cran
  • R >= 3.5.0 depends
  • broom * imports
  • broom.mixed * imports
  • cowplot * imports
  • dplyr * imports
  • gapminder * imports
  • ggplot2 * imports
  • ggraph * imports
  • glue * imports
  • igraph * imports
  • lavaan * imports
  • lme4 * imports
  • magrittr * imports
  • purrr * imports
  • rlang * imports
  • stringr * imports
  • tibble * imports
  • tidyr * imports
  • knitr * suggests
  • performance * suggests
  • progress * suggests
  • rmarkdown * suggests
  • testthat * suggests
  • tidyverse * suggests
.github/workflows/R-CMD-check.yaml actions
  • actions/checkout v3 composite
  • r-lib/actions/check-r-package v2 composite
  • r-lib/actions/setup-pandoc v2 composite
  • r-lib/actions/setup-r v2 composite
  • r-lib/actions/setup-r-dependencies v2 composite