demo_run: A synthetic bayesqm_run for examples and tutorials

View source: R/demo_fit.R

demo_runR Documentation

A synthetic bayesqm_run for examples and tutorials

Description

Returns a bayesqm_run object carrying a plausible ELPD trajectory across K = 1..K_max, with user-chosen peak K, Sivula K, and case label. Use it to demonstrate run_bayes() output and plot_elpd() without a Stan backend; it is not a substitute for run_bayes() on real data.

Usage

demo_run(
  K_max = 4L,
  k_peak = 3L,
  k_sivula = 2L,
  case = c("gap", "agree", "reversed"),
  seed = 1L
)

Arguments

K_max

Largest K in the comparison (default 4).

k_peak

K value where ELPD peaks (default 3).

k_sivula

K chosen by the Sivula parsimony rule (default 2).

case

Case label: "agree", "gap", or "reversed".

seed

Integer seed for reproducibility; NULL leaves the random number generator untouched.

Value

A bayesqm_run.

Examples

run <- demo_run()
run
plot_elpd(run)


bayesqm documentation built on June 18, 2026, 1:07 a.m.