{"id":28531590,"url":"https://github.com/fbartos/zcurve","last_synced_at":"2026-01-22T18:08:01.021Z","repository":{"id":44464790,"uuid":"220061840","full_name":"FBartos/zcurve","owner":"FBartos","description":"zcurve R package for assessing the reliability and trustworthiness of published literature with the z-curve method","archived":false,"fork":false,"pushed_at":"2025-05-19T09:48:29.000Z","size":2561,"stargazers_count":13,"open_issues_count":0,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-06-09T15:11:22.709Z","etag":null,"topics":["edr","err","replicability","z-cruve"],"latest_commit_sha":null,"homepage":"https://fbartos.github.io/zcurve","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/FBartos.png","metadata":{"files":{"readme":"README.Rmd","changelog":null,"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":"2019-11-06T18:19:57.000Z","updated_at":"2025-05-17T14:18:29.000Z","dependencies_parsed_at":"2024-05-28T14:35:47.703Z","dependency_job_id":"c536556e-cec4-4523-9eb5-424b1bf25162","html_url":"https://github.com/FBartos/zcurve","commit_stats":{"total_commits":31,"total_committers":3,"mean_commits":"10.333333333333334","dds":"0.32258064516129037","last_synced_commit":"1708a14c83b29281fd88777752cc21cf9b182ce9"},"previous_names":[],"tags_count":10,"template":false,"template_full_name":null,"purl":"pkg:github/FBartos/zcurve","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FBartos%2Fzcurve","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FBartos%2Fzcurve/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FBartos%2Fzcurve/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FBartos%2Fzcurve/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/FBartos","download_url":"https://codeload.github.com/FBartos/zcurve/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FBartos%2Fzcurve/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":264085423,"owners_count":23555198,"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":["edr","err","replicability","z-cruve"],"created_at":"2025-06-09T15:11:04.658Z","updated_at":"2025-10-30T04:02:21.200Z","avatar_url":"https://github.com/FBartos.png","language":"R","funding_links":[],"categories":[],"sub_categories":[],"readme":"---\noutput: github_document\n---\n\n\u003c!-- README.md is generated from README.Rmd. Please edit that file --\u003e\n\n```{r, include = FALSE}\nknitr::opts_chunk$set(\n  collapse = TRUE,\n  comment = \"#\u003e\",\n  fig.path = \"man/figures/README-\",\n  out.width = \"100%\"\n)\n```\n\n# zcurve\n\n\u003c!-- badges: start --\u003e\n[![R-CRAN-check](https://github.com/FBartos/zcurve/workflows/R-CMD-check/badge.svg)](https://github.com/FBartos/zcurve/actions)\n[![R-tests](https://github.com/FBartos/zcurve/workflows/R-CMD-tests/badge.svg)](https://github.com/FBartos/zcurve/actions)\n[![CRAN status](https://www.r-pkg.org/badges/version/zcurve)](https://CRAN.R-project.org/package=zcurve)\n\u003c!-- badges: end --\u003e\n\nThis package implements z-curves - methods for estimating expected discovery \nand replicability rates on bases of test-statistics of published studies. The package \nprovides functions for fitting the censored EM version (Schimmack \u0026 Bartoš, 2023), \nthe EM version (Bartoš \u0026 Schimmack, 2022) as well as the original density z-curve (Brunner \u0026 Schimmack, 2020). \nFurthermore, the package provides summarizing and plotting functions for the \nfitted z-curve objects. See the aforementioned articles for more information about \nz-curve, expected discovery rate (EDR), expected replicability rate (ERR), \nmaximum false discovery rate (FDR), as well as validation studies, and limitations.\n\n## Installation\n\nYou can install the current version of zcurve from CRAN with:\n\n``` r\ninstall.packages(\"zcurve\")\n```\n\nor the development version from [GitHub](https://github.com/) with:\n\n``` r\n# install.packages(\"devtools\")\ndevtools::install_github(\"FBartos/zcurve\")\n```\n\n## Example\n\nZ-curve can be used to estimate expected replicability rate (ERR), expected discovery rate (EDR), and \nmaximum false discovery rate (Soric FDR) using z-scores from a set of significant findings. \nThis is a reproduction of an example in Bartoš and Schimmack \n(2022) where the z-curve is used to estimate ERR and EDR on a subset of studies used in \nreproducibility project (OSC, 2015). Only studies with non-ambiguous original outcomes are used \n- excluding studies with \"marginally significant\" original findings, leading to 90 studies. Out of these\n90 studies, 35 were successfully replicated.\n\nWe included the recoded z-scores from the 90 OSC studies as a dataset in the package ('OSC.z'). The \nexpectation-maximization (EM) version of the z-curve is implemented as the default method and can be\nfitted (with 1000 bootstraps) and summarized using 'zcurve and 'summary' functions.\n\nThe first argument to the function call is a vector of z-scores. Alternatively, a vector of two-sided \np-values can be also used, by specifying \"zcurve(p = p.values)\".\n\n```{r}\nset.seed(666)\nlibrary(zcurve)\n\nfit \u003c- zcurve(OSC.z)\n\nsummary(fit)\n```\n\nMore details from the fitted object can be extracted from the fitted object. For more statistics, as \nexpected number of conducted studies, the file drawer ratio or Sorić's FDR specify 'all = TRUE' (see Schimmack \u0026 Bartoš, 2023) .\n\n```{r}\nsummary(fit, all = TRUE)\n```\n\nFor more information regarding the fitted model weights add 'type = \"parameters\"'.\n\n```{r}\nsummary(fit, type = \"parameters\")\n```\n\nThe package also provides a convenient plotting method for the z-curve fits. \n\n```{r}\nplot(fit)\n```\n\nThe default plot can be further modified by using classic R plotting arguments as 'xlab', 'ylab',\n'main', 'cex.axis', 'cex.lab'. Furthermore, an annotation with the main test statistics can be \nadded to the plot by specifying 'annotation = TRUE' and the pointwise confidence intervals of the\nplot by specifying \"CI = TRUE\". For more options regarding the annotation see '?plot.zcurve\". \n\n```{r}\nplot(fit, CI = TRUE, annotation = TRUE, main = \"OSC 2015\")\n```\n\nOther versions of the z-curves may be fitted by changing the method argument in the 'zcurve' function.\nSet 'method = \"density\"' to fit the new version of z-curve using density method (KD2). The original \nversion of the density method as implemented in Brunner and Schimmack (2020) can be fitted by adding\n'list(model = \"KD1\")' to the 'control' argument of 'zcurve'.\n\n(We omit bootstrapping to speed the fitting process in this case)\n\n```{r}\nfit.KD2 \u003c- zcurve(OSC.z, method = \"density\", bootstrap = FALSE)\nfit.KD1 \u003c- zcurve(OSC.z, method = \"density\", control = list(model = \"KD1\"), bootstrap = FALSE)\n\nsummary(fit.KD2)\n\nsummary(fit.KD1)\n```\n\nThe 'control' argument can be used to change the number of iterations or reducing the convergence \ncriterion in cases of non-convergence. It can be also used for constructing custom z-curves by \nchanging the location of the mean components, their number or many other settings. However, it is \nimportant to bear in mind that those custom models need to be validated first on simulation studies \nprior to their usage. For more information about the control settings see '?control_EM', '?control_density', \nand '?control_density_v1'.\n\nIf you encounter any problems or bugs, please, contact me at f.bartos96[at]gmail.com or submit an issue at\nhttps://github.com/FBartos/zcurve/issues. If you like the package and use it in your work, please, cite it\nas:\n```{r}\ncitation(package = \"zcurve\")\n```\n\n\n## Sources\nSchimmack, U., \u0026 Bartoš, F. (2023). Estimating the false discovery risk of (randomized) clinical trials in medical journals based on published p-values. _PLoS ONE, 18_(8), e0290084. https://doi.org/10.1371/journal.pone.0290084\n\nBartoš, F., \u0026 Schimmack, U. (2022). Z-curve 2.0: Estimating replication rates and discovery rates. _Meta-Psychology_, 6. https://doi.org/10.15626/MP.2021.2720\n\nBrunner, J., \u0026 Schimmack, U. (2020). Estimating population mean power under conditions of heterogeneity and selection for significance. _Meta-Psychology_, 4. https://doi.org/10.15626/MP.2018.874\n\nOpen Science Collaboration. (2015). Estimating the reproducibility of psychological science. _Science, 349_(6251), aac4716. https://doi.org/10.1126/science.aac4716\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffbartos%2Fzcurve","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffbartos%2Fzcurve","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffbartos%2Fzcurve/lists"}