{"id":24913192,"url":"https://github.com/pakillo/dharma.helpers","last_synced_at":"2026-03-11T03:01:32.325Z","repository":{"id":67410284,"uuid":"407522747","full_name":"Pakillo/DHARMa.helpers","owner":"Pakillo","description":"Helper functions to check Bayesian brms models with DHARMa","archived":false,"fork":false,"pushed_at":"2025-11-24T14:08:28.000Z","size":1820,"stargazers_count":4,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-11-28T03:10:52.719Z","etag":null,"topics":["bayesian","r-package","statistics"],"latest_commit_sha":null,"homepage":"https://pakillo.github.io/DHARMa.helpers/","language":"R","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Pakillo.png","metadata":{"files":{"readme":"README.Rmd","changelog":"NEWS.md","contributing":null,"funding":null,"license":"LICENSE","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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2021-09-17T11:55:21.000Z","updated_at":"2025-11-24T14:04:38.000Z","dependencies_parsed_at":null,"dependency_job_id":"d691f54f-0baf-46ae-be98-1ad7d469b91d","html_url":"https://github.com/Pakillo/DHARMa.helpers","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Pakillo/DHARMa.helpers","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Pakillo%2FDHARMa.helpers","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Pakillo%2FDHARMa.helpers/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Pakillo%2FDHARMa.helpers/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Pakillo%2FDHARMa.helpers/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Pakillo","download_url":"https://codeload.github.com/Pakillo/DHARMa.helpers/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Pakillo%2FDHARMa.helpers/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30368537,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-10T21:41:54.280Z","status":"online","status_checked_at":"2026-03-11T02:00:07.027Z","response_time":84,"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":["bayesian","r-package","statistics"],"created_at":"2025-02-02T05:30:01.092Z","updated_at":"2026-03-11T03:01:32.320Z","avatar_url":"https://github.com/Pakillo.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# DHARMa.helpers\n\n\u003c!-- badges: start --\u003e\n[![R-CMD-check](https://github.com/Pakillo/DHARMa.helpers/actions/workflows/R-CMD-check.yaml/badge.svg)](https://github.com/Pakillo/DHARMa.helpers/actions/workflows/R-CMD-check.yaml)\n[![HitCount](https://hits.dwyl.com/Pakillo/DHARMAhelpers.svg?style=flat-square)](http://hits.dwyl.com/Pakillo/DHARMAhelpers)\n[![HitCount](https://hits.dwyl.com/Pakillo/DHARMAhelpers.svg?style=flat-square\u0026show=unique)](http://hits.dwyl.com/Pakillo/DHARMAhelpers)\n\u003c!-- badges: end --\u003e\n\nhttps://pakillo.github.io/DHARMa.helpers\n\nDHARMa.helpers is an R package that facilitates checking fitted statistical models via the [DHARMa](https://cran.r-project.org/web/packages/DHARMa/vignettes/DHARMa.html) package. By now, only Bayesian models fitted with [brms](https://paul-buerkner.github.io/brms/) are implemented. See [this blogpost](https://frodriguezsanchez.net/post/using-dharma-to-check-bayesian-models-fitted-with-brms/) for a detailed explanation of the approach.\n\n## Installation\n\n``` r\n# install.packages(\"remotes\")\nremotes::install_github(\"Pakillo/DHARMa.helpers\")\n```\n\n## Example\n\n```{r message = FALSE}\nlibrary(brms)\nlibrary(DHARMa.helpers)\n```\n\n### Poisson regression\n\nFit model:\n\n```{r cache = TRUE}\n# Example model taken brms::brm()\n# Poisson regression for the number of seizures in epileptic patients\nfit1 \u003c- brm(count ~ zAge + zBase * Trt + (1|patient),\n            data = epilepsy, family = poisson(), refresh = 0)\n```\n\nCheck with DHARMa: \n\n```{r}\nsimres \u003c- dh_check_brms(fit1, integer = TRUE)\n```\n\nNote that we use `integer = TRUE` in this case as we are modelling a discrete response (counts).\n\nNow check residuals against a predictor (zAge):\n\n```{r}\nplot(simres, form = epilepsy$zAge)\n```\n\nTest overdispersion:\n\n```{r}\nDHARMa::testDispersion(simres)\n```\n\n\nSee https://pakillo.github.io/DHARMa.helpers/reference/dh_check_brms.html for more examples.\n\n\n\n\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpakillo%2Fdharma.helpers","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpakillo%2Fdharma.helpers","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpakillo%2Fdharma.helpers/lists"}