svyder: Design Effect Ratio Diagnostics for Bayesian Survey Models
Source:R/svyder-package.R
svyder-package.RdComputes parameter-level Design Effect Ratios (DER) for Bayesian hierarchical models fitted to complex survey data. The package implements a compute-classify-correct diagnostic framework:
Details
Compute: Calculate DER for each parameter using a sandwich variance estimator.
Classify: Assign estimable parameters by information source and flag those exceeding a threshold.
Correct: Apply selective Cholesky correction to flagged parameters only.
Core pipeline
der_compute(): Compute DER values.der_classify(): Estimable-parameter classification.der_correct(): Selective Cholesky correction.der_diagnose(): All-in-one wrapper.
Analysis
der_decompose(): Decompose DER into DEFF, B, R_k, kappa.der_sensitivity(): Threshold sensitivity analysis.der_theorem_check(): Verify theoretical predictions.der_compare(): Compare across clustering definitions.
Backend support
cmdstanr:
der_compute.CmdStanMCMC(),extract_draws.CmdStanMCMC()rstanarm:
der_compute.stanreg(),extract_draws.stanreg()survey:
extract_design.survey.design2()
Bundled datasets
nsece_demo: Synthetic NSECE-like survey data (binomial, J=51).
sim_hlr: Balanced hierarchical linear regression (gaussian, J=10).
References
Lee, J., Williams, M. R., & Savitsky, T. D. (2026). Design Effect Ratios for Bayesian Survey Models: A Diagnostic Framework for Identifying Survey-Sensitive Parameters. Journal of Survey Statistics and Methodology. Submitted.