Package: bayesqm 0.2.0

bayesqm: Bayesian Q Methodology: Exact Rank-Order Likelihood for Forced Q Sorts

A Bayesian analysis for Q methodology, alongside the classical one. Models the forced Q sort as an ordered partition of the statements through an exact rank-order likelihood (the design quotas fix the partition margins, so the likelihood of the observed sorting event is exact), fits it by a parameter-expanded Gibbs sampler in R with no compiled code and a convergence gate on rotation-invariant functionals, resolves rotational ambiguity via the MatchAlign post-processing of Poworoznek et al. (2025) <doi:10.1214/25-BA1544>, and returns the familiar Q tables as posterior summaries: credible intervals for bounded participant loadings, flag probabilities with an explicit unclassified state, quota-respecting factor arrays, distinguishing and consensus statements judged against a posterior critical difference and a grid-width equivalence region, one posterior false-discovery rule for all published claims, and a two-signal posterior-predictive workflow for the number of factors.

Authors:Raymond Dacosta Azadda [aut, cre], Henry Ofoe Agbi-Kaiser [aut], Hannah D. Robinson [aut], AK-ACE Team [aut], Karsten Hueffer [aut], Taa'aii Peter [aut], Stacy Rasmus [aut]

bayesqm_0.2.0.tar.gz
bayesqm_0.2.0.zip(r-4.7-any)bayesqm_0.2.0.zip(r-4.6-any)bayesqm_0.2.0.zip(r-4.5-any)
bayesqm_0.2.0.tgz(r-4.6-any)bayesqm_0.2.0.tgz(r-4.5-any)
bayesqm_0.2.0.tar.gz(r-4.7-any)bayesqm_0.2.0.tar.gz(r-4.6-any)
bayesqm_0.2.0.tgz(r-4.6-emscripten)
manual.pdf |manual.html
DESCRIPTION |NEWS
card.svg |card.png
bayesqm/json (API)

# Install 'bayesqm' in R:
install.packages('bayesqm', repos = c('https://rdazadda.r-universe.dev', 'https://cloud.r-project.org'))

Bug tracker:https://github.com/rdazadda/bayesqm/issues

Pkgdown/docs site:https://rdazadda.github.io

Datasets:

On CRAN:

Conda:

4.95 score 9 scripts 194 downloads 87 exports 21 dependencies

Last updated from:9e0babbc0d. Checks:9 OK. Indexed: yes.

TargetResultTimeFilesSyslog
linux-develOK241
source / vignettesOK178
linux-releaseOK194
macos-releaseOK164
macos-oldrelOK142
windows-develOK244
windows-releaseOK157
windows-oldrelOK162
wasm-releaseOK117

Exports:assess_classificationassess_recoverybayesqm_colorsbayesqm_set_colorscaption_bayesqmcheck_distributioncheck_fitcheck_personsclaimsclassify_membershipcompute_divergencecompute_dominant_probcompute_dominant_signcompute_factor_arraycompute_flagscompute_loadingscompute_posterior_scalarscompute_qdccompute_threshold_probcompute_zscorescrib_sheetcritical_deltadelta_griddemo_fitdemo_rundiscretize_to_gridextendfactor_characteristicsfit_bayesianfit_ladderflip_factorgenerate_datagenerate_loadingsgenerate_noiseget_distributionimport.easyhtmlqimport.htmlqimport.kenqimport.pqmethodinfer_distributionloglik_personloo_laddermake_dominant_panelmake_elpd_diffmake_ppc_ridgematchalignparse_distributionplot_choice_kplot_contrastsplot_convergenceplot_dist_consplot_elpdplot_factor_arrayplot_flagsplot_hyperplot_loading_posteriorplot_membershipplot_person_checkplot_ppcplot_sortsplot_statementplot_tuckerplot_zscore_posteriorplot_zscoresposterior_intervalprior_summaryprocrustes_rotationqsort_dataread_easyhtml_firebaseread_kade_zipread_kenqread_kenq_excelread_pqmethodread_qsortread_qsort_csvread_qsort_excelread_statementsrename_factorsrotate_factorsrun_bayessave_bayesqm_plotselect_kselect_k_peakselect_k_sivulasuggest_deltatucker_congruencevalidate_qsort

Dependencies:abindbackportscheckmatecliclueclusterdistributionalgenericsgluelifecyclemagrittrmatrixStatsnumDerivpillarpkgconfigposteriorrlangtensorAtibbleutf8vctrs

Output codebook
compute_loadings() | compute_flags() | compute_zscores() | compute_factor_array() | compute_qdc() | factor_characteristics() | claims() | check_fit() and check_persons() | crib_sheet() | select_k()

Last update: 2026-08-13
Started: 2026-08-13

Getting started with bayesqm
The sorts | The fit | Who holds each viewpoint | What each viewpoint says | Where they differ and where they agree | What gets reported | The per-factor block | Checking the model | How many viewpoints | Coming from PQMethod or qmethod | Reproducibility | Where next | References

Last update: 2026-08-13
Started: 2026-04-20

Readme and manuals

Help Manual

Help pageTopics
Simulation-study assessment helpersassess_classification assess_recovery
Get or set the bayesqm colour schemebayesqm-colors bayesqm_colors bayesqm_set_colors
Caption text for figures from a fitcaption_bayesqm
Posterior-predictive checks of the fitted modelcheck_fit
The person check against mixed-replication bandscheck_persons
Selected claims at a common false-discovery levelclaims
Posterior-mean bounded loadingscoef.bayesqm_fit
Quota-respecting factor arrayscompute_factor_array
Flag probabilities with an explicit unclassified statecompute_flags
Bounded participant loadings with credible intervalscompute_loadings
Distinguishing and consensus verdictscompute_qdc
Statement scores with credible intervalscompute_zscores
Extreme-placement probabilities per statement and factorcrib_sheet
Grid width on the z scaledelta_grid
A small demonstration fitdemo_fit
Continue sampling a fitted chainextend
Factor characteristicsfactor_characteristics
Fit the exact partition-likelihood model to forced Q sortsfit_bayesian
Fit the model over a ladder of Kfit_ladder
Posterior-mean reconstruction on the utility scalefitted.bayesqm_fit
Flip the pole of one factorflip_factor
Simulate Q-sort datadiscretize_to_grid generate_data generate_loadings generate_noise get_distribution
Grizzly bear reintroduction Q sortsgrizzly_sorts
qmethod-style import aliasesimport-aliases import.easyhtmlq import.htmlq import.kenq import.pqmethod
Person-level partition log-likelihoodsloglik_person
PSIS-LOO across the ladder, as directional corroborationloo_ladder
MatchAlign post-processing for partition-model drawsmatchalign
Childhood obesity Q sortsobesity_sorts
The two-signal choice-of-K displayplot_choice_k
Statement contrasts between two factorsplot_contrasts plot_dist_cons
The factor array on its gridplot_factor_array
Bounded loadings with credible intervalsplot.bayesqm_fit plot_loading_posterior
Flag probabilities with the unclassified stateplot_flags plot_membership
The person check against the mixed bandsplot_person_check
Posterior-predictive check displayplot_ppc
Preview every participant's sortplot_sorts
One statement, in depthplot_statement plot_zscore_posterior
Convergence and alignment viewplot_convergence plot_tucker
Statement scores across factors, whole panelplot_zscores
Posterior interval genericposterior_interval
Credible intervals for bayesqm_fit parametersposterior_interval.bayesqm_fit
Prior summary genericprior_summary
Prior summary for a bayesqm_fitprior_summary.bayesqm_fit
Construct a validated qsort_data objectcheck_distribution infer_distribution parse_distribution qsort_data validate_qsort
Print, summary, and matrix conversion for qsort_dataas.matrix.qsort_data print.qsort_data qsort_data-methods summary.qsort_data
Read Q-sort data from fileread_easyhtml_firebase read_kade_zip read_kenq read_kenq_excel read_pqmethod read_qsort read_qsort_csv read_qsort_excel read_statements
Rename the factorsrename_factors
Rotate every aligned draw toward a targetrotate_factors
Save a bayesqm plot to filesave_bayesqm_plot
Choose K by the two-signal ruleselect_k
Posterior-mean loading scalessigma.bayesqm_fit
Tucker's congruence and orthogonal Procrustes rotationprocrustes_rotation tucker_congruence