From e8396ab7b7db1280ee485835e5ab1118f57534e8 Mon Sep 17 00:00:00 2001 From: Don van den Bergh Date: Wed, 19 Nov 2025 13:53:44 +0100 Subject: [PATCH 1/2] fix sticker --- .gitignore | 1 + DESCRIPTION | 2 +- README.md | 30 +- Readme.Rmd | 46 ++- inst/bgms_sticker.svg | 903 ------------------------------------------ 5 files changed, 45 insertions(+), 937 deletions(-) delete mode 100755 inst/bgms_sticker.svg diff --git a/.gitignore b/.gitignore index ab1c20cd..65196573 100644 --- a/.gitignore +++ b/.gitignore @@ -10,3 +10,4 @@ src/*.dll /Meta/ src/Makevars src/Makevars.win +docs/* diff --git a/DESCRIPTION b/DESCRIPTION index ad9ab813..621e80b4 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -19,7 +19,7 @@ Maintainer: Maarten Marsman Description: Bayesian variable selection methods for analyzing the structure of a Markov random field model for a network of binary and/or ordinal variables. Copyright: Includes datasets 'ADHD' and 'Boredom', which are licensed under CC-BY 4. See individual data documentation for license and citation. License: GPL (>= 2) -URL: https://Bayesian-Graphical-Modelling-Lab.github.io/bgms/ +URL: https://Bayesian-Graphical-Modelling-Lab.github.io/bgms/, https://github.com/Bayesian-Graphical-Modelling-Lab/bgms BugReports: https://github.com/Bayesian-Graphical-Modelling-Lab/bgms/issues Imports: Rcpp (>= 1.0.7), diff --git a/README.md b/README.md index 9511c3a5..149a6fda 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,3 @@ - [![CRAN @@ -7,7 +6,12 @@ Version](https://www.r-pkg.org/badges/version/bgms)](https://cran.r-project.org/ [![Total](https://cranlogs.r-pkg.org/badges/grand-total/bgms)](https://cran.r-project.org/package=bgms) -# bgms +
+

bgms

+ + bgms website + +
**Bayesian analysis of graphical models with binary and ordinal variables** @@ -23,7 +27,7 @@ corresponding pseudoposterior distribution of the model parameters. The package has two main entry points: -- `bgm()` – estimates a single network in a one-sample design. +- `bgm()` – estimates a single network in a one-sample design. - `bgmCompare()` – compares networks between groups in an independent-sample design. @@ -31,20 +35,20 @@ The package has two main entry points: Both functions support **effect selection** with spike-and-slab priors: -- **Edges in one-sample designs**: +- **Edges in one-sample designs**: `bgm()` models the presence or absence of edges between variables. Posterior inclusion probabilities indicate the plausibility of each edge and can be converted into Bayes factors for conditional independence tests (see Marsman et al., 2025; Sekulovski et al., 2024). -- **Communities/clusters in one-sample designs**: +- **Communities/clusters in one-sample designs**: `bgm()` can also model community structure. Posterior probabilities for the number of clusters quantify the plausibility of clustering solutions and can be converted into Bayes factors (see Sekulovski et al., 2025). -- **Group differences in independent-sample designs**: +- **Group differences in independent-sample designs**: `bgmCompare()` models differences in edge weights and category thresholds between groups. Posterior inclusion probabilities indicate the plausibility of parameter differences and can be converted into @@ -56,9 +60,9 @@ Both functions support **effect selection** with spike-and-slab priors: For worked examples and tutorials, see the package vignettes: - [Getting - Started](https://bayesian-graphical-modelling-lab.github.io/bgms/articles/intro.html) + Started](https://bayesian-graphical-modelling-lab.github.io/bgms/articles/intro.html) - [Model - Comparison](https://bayesian-graphical-modelling-lab.github.io/bgms/articles/comparison.html) + Comparison](https://bayesian-graphical-modelling-lab.github.io/bgms/articles/comparison.html) - [Diagnostics and Spike-and-Slab Summaries](https://bayesian-graphical-modelling-lab.github.io/bgms/articles/diagnostics.html) @@ -86,7 +90,7 @@ association between the unconnected pair. When analyzing an MRF, we often want to compare competing hypotheses: - **Edge presence vs. edge absence** (conditional dependence - vs. independence) in one-sample designs. + vs. independence) in one-sample designs. - **Parameter difference vs. parameter equivalence** in independent-sample designs. @@ -99,7 +103,7 @@ Bayesian inference avoids this problem. Using **inclusion Bayes factors** (Huth et al., 2023; Sekulovski et al., 2024), we can quantify evidence in both directions: -- **Evidence of edge presence** vs. **evidence of edge absence**, or +- **Evidence of edge presence** vs. **evidence of edge absence**, or - **Evidence of parameter difference** vs. **evidence of parameter equivalence**. @@ -112,9 +116,9 @@ evidence*. The current developmental version can be installed with ``` r -if (!requireNamespace("remotes")) { - install.packages("remotes") -} +if (!requireNamespace("remotes")) { + install.packages("remotes") +} remotes::install_github("Bayesian-Graphical-Modelling-Lab/bgms") ``` diff --git a/Readme.Rmd b/Readme.Rmd index 2af31f35..62d83617 100644 --- a/Readme.Rmd +++ b/Readme.Rmd @@ -3,7 +3,7 @@ output: github_document bibliography: inst/REFERENCES.bib csl: inst/apa.csl --- - + ```{r, echo = FALSE, message=F} knitr::opts_chunk$set( collapse = TRUE, @@ -11,19 +11,25 @@ knitr::opts_chunk$set( fig.path = "man/figures/README-", dev = "png", dpi = 200, - fig.align = "center", knitr::opts_chunk$set(comment = NA) ) library(bgms) ``` + +
+

bgms

+ + bgms website + +
+ [![CRAN Version](https://www.r-pkg.org/badges/version/bgms)](https://cran.r-project.org/package=bgms) [![Downloads](https://cranlogs.r-pkg.org/badges/bgms)](https://cran.r-project.org/package=bgms) [![Total](https://cranlogs.r-pkg.org/badges/grand-total/bgms)](https://cran.r-project.org/package=bgms) -# bgms **Bayesian analysis of graphical models with binary and ordinal variables** @@ -38,7 +44,7 @@ distribution of the model parameters. The package has two main entry points: -- `bgm()` – estimates a single network in a one-sample design. +- `bgm()` – estimates a single network in a one-sample design. - `bgmCompare()` – compares networks between groups in an independent-sample design. @@ -46,29 +52,29 @@ The package has two main entry points: Both functions support **effect selection** with spike-and-slab priors: -- **Edges in one-sample designs**: +- **Edges in one-sample designs**: `bgm()` models the presence or absence of edges between variables. Posterior inclusion probabilities indicate the plausibility of each edge and can be converted into Bayes factors for conditional independence tests [see @MarsmanVandenBerghHaslbeck_2024; @SekulovskiEtAl_2024]. -- **Communities/clusters in one-sample designs**: +- **Communities/clusters in one-sample designs**: `bgm()` can also model community structure. Posterior probabilities for the number of clusters quantify the plausibility of clustering solutions and can be converted into Bayes factors [see @SekulovskiEtAl_2025]. -- **Group differences in independent-sample designs**: +- **Group differences in independent-sample designs**: `bgmCompare()` models differences in edge weights and category thresholds between groups. Posterior inclusion probabilities indicate the plausibility of parameter differences and can be converted into Bayes factors for tests of parameter equivalence [see @MarsmanWaldorpSekulovskiHaslbeck_2024]. - + ## Learn more For worked examples and tutorials, see the package vignettes: -- [Getting Started](https://bayesian-graphical-modelling-lab.github.io/bgms/articles/intro.html) -- [Model Comparison](https://bayesian-graphical-modelling-lab.github.io/bgms/articles/comparison.html) -- [Diagnostics and Spike-and-Slab Summaries](https://bayesian-graphical-modelling-lab.github.io/bgms/articles/diagnostics.html) +- [Getting Started](https://bayesian-graphical-modelling-lab.github.io/bgms/articles/intro.html) +- [Model Comparison](https://bayesian-graphical-modelling-lab.github.io/bgms/articles/comparison.html) +- [Diagnostics and Spike-and-Slab Summaries](https://bayesian-graphical-modelling-lab.github.io/bgms/articles/diagnostics.html) You can also access these directly from R with: @@ -79,7 +85,7 @@ browseVignettes("bgms") ## Why use Markov Random Fields? -Graphical models or networks have become central in recent psychological and psychometric research [@RobinaughEtAl_2020; @MarsmanRhemtulla_2022_SIintro; @ContrerasEtAl_2019]. Most are **Markov random field (MRF)** models, where the graph structure reflects partial associations between variables [@KindermannSnell1980]. +Graphical models or networks have become central in recent psychological and psychometric research [@RobinaughEtAl_2020; @MarsmanRhemtulla_2022_SIintro; @ContrerasEtAl_2019]. Most are **Markov random field (MRF)** models, where the graph structure reflects partial associations between variables [@KindermannSnell1980]. In an MRF, a missing edge between two variables implies **conditional independence** given the rest of the network [@Lauritzen2004]. In other words, the remaining variables fully explain away any potential association between the unconnected pair. @@ -87,25 +93,25 @@ In an MRF, a missing edge between two variables implies **conditional independen When analyzing an MRF, we often want to compare competing hypotheses: -- **Edge presence vs. edge absence** (conditional dependence vs. independence) in one-sample designs. +- **Edge presence vs. edge absence** (conditional dependence vs. independence) in one-sample designs. - **Parameter difference vs. parameter equivalence** in independent-sample designs. Frequentist approaches are limited in such comparisons: they can reject a null hypothesis, but they cannot provide evidence *for* it. As a result, when an edge or difference is excluded, it remains unclear whether this reflects true absence or simply insufficient power. Bayesian inference avoids this problem. Using **inclusion Bayes factors** [@HuthEtAl_2023_intro; @SekulovskiEtAl_2024], we can quantify evidence in both directions: -- **Evidence of edge presence** vs. **evidence of edge absence**, or -- **Evidence of parameter difference** vs. **evidence of parameter equivalence**. +- **Evidence of edge presence** vs. **evidence of edge absence**, or +- **Evidence of parameter difference** vs. **evidence of parameter equivalence**. This makes it possible not only to detect structure and group differences, but also to conclude when there is an *absence of evidence*. ## Installation -The current developmental version can be installed with -```{r gh-installation, eval = FALSE} -if (!requireNamespace("remotes")) { - install.packages("remotes") -} +The current developmental version can be installed with +```{r gh-installation, eval = FALSE} +if (!requireNamespace("remotes")) { + install.packages("remotes") +} remotes::install_github("Bayesian-Graphical-Modelling-Lab/bgms") ``` diff --git a/inst/bgms_sticker.svg b/inst/bgms_sticker.svg deleted file mode 100755 index 30acb8d1..00000000 --- a/inst/bgms_sticker.svg +++ /dev/null @@ -1,903 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - From 99372ba450ed78577fae41f5067586dabd29737f Mon Sep 17 00:00:00 2001 From: Don van den Bergh Date: Wed, 19 Nov 2025 14:23:18 +0100 Subject: [PATCH 2/2] forget to add new location of sticker --- man/figures/bgms_sticker.svg | 903 +++++++++++++++++++++++++++++++++++ 1 file changed, 903 insertions(+) create mode 100755 man/figures/bgms_sticker.svg diff --git a/man/figures/bgms_sticker.svg b/man/figures/bgms_sticker.svg new file mode 100755 index 00000000..30acb8d1 --- /dev/null +++ b/man/figures/bgms_sticker.svg @@ -0,0 +1,903 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +