
Run Integrated Workflow (Prior, MCMC, Posterior)
run_pgdcm_auto.RdOrchestrates the complete end-to-end Bayesian estimation pipeline for PGDCM and SEM. Computes prior predictive checks, compiles and runs Nimble MCMC, assesses convergence, and generates posterior predictive checks.
Usage
run_pgdcm_auto(
config,
estimation_config = list(niter = 1000, nburnin = 100, chains = 2, prior_sims = NULL,
post_sims = NULL),
prefix = NULL,
threshold = 0.5,
return_groups = FALSE,
estimate = TRUE
)Arguments
- config
Model configuration list from
build_model_config.- estimation_config
List of parameters controlling MCMC execution (
niter,nburnin,chains,prior_sims,post_sims). Theprior_simsandpost_simsarguments control the number of simulated datasets drawn during Prior and Posterior Predictive Checking respectively. PassingNULLdisables these checks entirely. Defaults tolist(niter = 1000, nburnin = 100, chains = 2, prior_sims = NULL, post_sims = NULL).- prefix
Character. Descriptor prefix used for saving generated reports. Defaults to a timestamped string based on the model type.
- threshold
Numeric. The mastery probability threshold to use for latent class grouping. Default is 0.5.
- return_groups
Logical. If
TRUE, the model groups participants into exhaustive latent classes (Caution: Scales exponentially with attributes). Default isFALSE.- estimate
Logical. If
TRUE(default), MCMC estimation is performed. IfFALSE, estimation is skipped (e.g., to only run prior predictive checks).
Value
A comprehensive list containing:
mcmc_out: The raw Nimble MCMC output list.samples: The cleanedmcmc.listwith structural NAs removed.mapped_parameters: A data.frame of all summary statistics mapped from model parameter names to human-readable names.skill_profiles: Generated bygenerate_summary_tables(); An I x K matrix of posterior mean mastery for each student.item_parameters: Generated bygenerate_summary_tables(); A clean table of difficulty and discrimination parameters per item.group_patterns: Generated bygenerate_summary_tables(); A list organizing participants into latent classes based on 0.5 mastery thresholds.prior_ppc: Results from the prior predictive check (if requested).post_ppc: Results from the posterior predictive check (if requested).WAIC: The Watanabe-Akaike Information Criterion metric.