Bayesian comparison on networks of binary and ordinal variables in two independent samples using the bgmCompare function

Introduction

This example demonstrates how to use the bgmCompare function for Bayesian analysis of the ordinal Markov Random Field (MRF) model in two independent samples.

knitr::opts_chunk$set(
  collapse = TRUE,
  comment = "#>",
  eval = identical(Sys.getenv("BUILD_VIGNETTE"), "true")
)
library(bgms)

Example --

Usage

bgmCompare(x,
           y,
           difference_selection = TRUE,
           main_difference_model = c("Collapse", "Constrain", "Free"),
           variable_type = "ordinal",
           reference_category,
           pairwise_difference_scale = 1,
           main_difference_scale = 1,
           pairwise_difference_prior = c("Bernoulli", "Beta-Bernoulli"),
           main_difference_prior = c("Bernoulli", "Beta-Bernoulli"),
           pairwise_difference_probability = 0.5,
           main_difference_probability = 0.5,
           pairwise_beta_bernoulli_alpha = 1,
           pairwise_beta_bernoulli_beta = 1,
           main_beta_bernoulli_alpha = 1,
           main_beta_bernoulli_beta = 1,
           interaction_scale = 2.5,
           threshold_alpha = 0.5,
           threshold_beta = 0.5,
           iter = 1e4,
           burnin = 1e3,
           na.action = c("listwise", "impute"),
           save = FALSE,
           display_progress = TRUE)

Arguments

References



Try the bgms package in your browser

Any scripts or data that you put into this service are public.

bgms documentation built on April 4, 2025, 2:59 a.m.