|
2 | 2 | #' |
3 | 3 | #' @description |
4 | 4 | #' The \code{R} package \strong{bgms} provides tools for Bayesian analysis of |
5 | | -#' the ordinal Markov random field, a graphical model describing a network of |
6 | | -#' binary and/or ordinal variables \insertCite{MarsmanVandenBerghHaslbeck_2024}{bgms}. |
7 | | -#' A pseudolikelihood is used to approximate the likelihood of the graphical |
8 | | -#' model, and Markov chain Monte Carlo methods are used to simulate from the |
9 | | -#' corresponding pseudoposterior distribution of the graphical model parameters. |
| 5 | +#' the ordinal Markov random field (MRF), a graphical model describing networks |
| 6 | +#' of binary and/or ordinal variables \insertCite{MarsmanVandenBerghHaslbeck_2024}{bgms}. |
| 7 | +#' The likelihood is approximated via a pseudolikelihood, and Markov chain Monte |
| 8 | +#' Carlo (MCMC) methods are used to sample from the corresponding pseudoposterior |
| 9 | +#' distribution of model parameters. |
10 | 10 | #' |
11 | | -#' The \strong{bgm} function can be used for a one-sample design and the |
12 | | -#' \strong{bgmCompare} function can be used for a two-independent-samples design |
13 | | -#' \insertCite{MarsmanWaldorpSekulovskiHaslbeck_2024}{bgms}. Both functions can |
14 | | -#' model the selection of effects. In one-sample designs, the \strong{bgm} |
15 | | -#' function models the presence or absence of edges between pairs of variables |
16 | | -#' in the network. The estimated posterior inclusion probability indicates how |
17 | | -#' plausible it is that a network with an edge between the two corresponding |
18 | | -#' variables produced the observed data, and can be converted into a Bayes |
19 | | -#' factor test for conditional independence. |
| 11 | +#' The main entry points are: |
| 12 | +#' \itemize{ |
| 13 | +#' \item \strong{bgm}: estimation in a one-sample design. |
| 14 | +#' \item \strong{bgmCompare}: estimation and group comparison in an |
| 15 | +#' independent-sample design. |
| 16 | +#' } |
| 17 | +#' |
| 18 | +#' Both functions support Bayesian effect selection with spike-and-slab priors. |
| 19 | +#' \itemize{ |
| 20 | +#' \item In one-sample designs, \code{bgm} models the presence or absence of |
| 21 | +#' edges between variables. Posterior inclusion probabilities quantify the |
| 22 | +#' plausibility of each edge and can be converted into Bayes factors for |
| 23 | +#' conditional independence tests. |
20 | 24 | #' |
21 | | -#' In two-independent-samples designs, the \strong{bgmCompare} function models |
22 | | -#' the selection of group differences in edge weights and possibly category |
23 | | -#' thresholds. The estimated posterior inclusion probability indicates how |
24 | | -#' plausible it is that graphical models with a difference in the corresponding |
25 | | -#' edge weight or category threshold generated the data at hand, and can be |
26 | | -#' converted to a Bayes factor test for parameter equivalence. |
| 25 | +#' \item \code{bgm} can also model communities (clusters) of variables. The |
| 26 | +#' posterior distribution of the number of clusters provides evidence for or |
| 27 | +#' against clustering \insertCite{SekulovskiEtAl_2025}{bgms}. |
27 | 28 | #' |
28 | | -#' The \strong{bgms} package offers several tools for analyzing the structure of |
29 | | -#' the MRF: |
| 29 | +#' \item In independent-sample designs, \code{bgmCompare} estimates group |
| 30 | +#' differences in edge weights and category thresholds. Posterior inclusion |
| 31 | +#' probabilities quantify the evidence for differences and can be converted |
| 32 | +#' into Bayes factors for parameter equivalence tests |
| 33 | +#' \insertCite{MarsmanWaldorpSekulovskiHaslbeck_2024}{bgms}. |
| 34 | +#' } |
30 | 35 | #' |
| 36 | +#' @section Tools: |
| 37 | +#' The package also provides: |
31 | 38 | #' \enumerate{ |
32 | | -#' \item Simulate response data from the MRF using the Gibbs sampler. |
33 | | -#' \itemize{ |
34 | | -#' \item Simulate \code{\link{mrfSampler}}. |
35 | | -#' } |
36 | | -# |
37 | | -#' \item Estimate the posterior distribution of the MRF's parameters and |
38 | | -#' possibly its network structure in one-sample designs. |
39 | | -#' \itemize{ |
40 | | -#' \item Bayesian estimation or Bayesian edge selection with \code{\link{bgm}}. |
41 | | -#' } |
42 | | -#' |
43 | | -#' \item Estimate the posterior distribution of the MRF's parameters in a |
44 | | -#' two-independent-sample design, and possibly perform selection on group |
45 | | -#' differences in MRF parameters. |
46 | | -#' \itemize{ |
47 | | -#' \item Bayesian estimation or Bayesian difference selection with \code{\link{bgmCompare}}. |
48 | | -#' } |
| 39 | +#' \item Simulation of response data from MRFs with a Gibbs sampler |
| 40 | +#' (\code{\link{mrfSampler}}). |
| 41 | +#' \item Posterior estimation and edge selection in one-sample designs |
| 42 | +#' (\code{\link{bgm}}). |
| 43 | +#' \item Posterior estimation and group-difference selection in |
| 44 | +#' independent-sample designs (\code{\link{bgmCompare}}). |
49 | 45 | #' } |
50 | 46 | #' |
51 | 47 | #' @section Vignettes: |
52 | 48 | #' For tutorials and worked examples, see: |
53 | 49 | #' \itemize{ |
54 | | -#' \item \code{vignette("intro", package = "bgms")} for a getting started guide. |
55 | | -#' \item \code{vignette("comparison", package = "bgms")} for model comparison. |
56 | | -#' \item \code{vignette("diagnostics", package = "bgms")} for diagnostics and spike-and-slab summaries. |
| 50 | +#' \item \code{vignette("intro", package = "bgms")} — Getting started. |
| 51 | +#' \item \code{vignette("comparison", package = "bgms")} — Model comparison. |
| 52 | +#' \item \code{vignette("diagnostics", package = "bgms")} — Diagnostics and |
| 53 | +#' spike-and-slab summaries. |
57 | 54 | #' } |
58 | 55 | #' |
59 | 56 | #' @docType package |
|
0 commit comments