Skip to contents

Model fitting

Fit the exact partition-likelihood model, continue a gated chain, and realign draws.

fit_bayesian()
Fit the exact partition-likelihood model to forced Q sorts
extend()
Continue sampling a fitted chain
matchalign()
MatchAlign post-processing for partition-model draws
delta_grid()
Grid width on the z scale

The tables

The familiar Q outputs as posterior summaries, and the one false-discovery rule behind every claim.

compute_loadings()
Bounded participant loadings with credible intervals
compute_flags()
Flag probabilities with an explicit unclassified state
compute_zscores()
Statement scores with credible intervals
compute_factor_array()
Quota-respecting factor arrays
compute_qdc()
Distinguishing and consensus verdicts
factor_characteristics()
Factor characteristics
crib_sheet()
Extreme-placement probabilities per statement and factor
claims()
Selected claims at a common false-discovery level

Model checking and choice of K

check_fit()
Posterior-predictive checks of the fitted model
check_persons()
The person check against mixed-replication bands
fit_ladder()
Fit the model over a ladder of K
select_k()
Choose K by the two-signal rule
loo_ladder()
PSIS-LOO across the ladder, as directional corroboration
loglik_person()
Person-level partition log-likelihoods

Rotation and reporting

rotate_factors()
Rotate every aligned draw toward a target
flip_factor()
Flip the pole of one factor
rename_factors()
Rename the factors

Plots

Base-graphics views of the fit; ggplot2::autoplot() serves the flagship four (loadings, flags, contrasts, array).

plot_loading_posterior() plot(<bayesqm_fit>)
Bounded loadings with credible intervals
plot_sorts()
Preview every participant's sort
plot_zscores()
Statement scores across factors, whole panel
plot_statement() plot_zscore_posterior()
One statement, in depth
plot_membership() plot_flags()
Flag probabilities with the unclassified state
plot_factor_array()
The factor array on its grid
plot_dist_cons() plot_contrasts()
Statement contrasts between two factors
plot_choice_k()
The two-signal choice-of-K display
plot_person_check()
The person check against the mixed bands
plot_tucker() plot_convergence()
Convergence and alignment view
plot_ppc()
Posterior-predictive check display

Theming and export

bayesqm_colors() bayesqm_set_colors()
Get or set the bayesqm colour scheme
save_bayesqm_plot()
Save a bayesqm plot to file
caption_bayesqm()
Caption text for figures from a fit

Standard accessors for a bayesqm_fit

coef(<bayesqm_fit>)
Posterior-mean bounded loadings
fitted(<bayesqm_fit>)
Posterior-mean reconstruction on the utility scale
sigma(<bayesqm_fit>)
Posterior-mean loading scales
posterior_interval()
Posterior interval generic
posterior_interval(<bayesqm_fit>)
Credible intervals for bayesqm_fit parameters
prior_summary()
Prior summary generic
prior_summary(<bayesqm_fit>)
Prior summary for a bayesqm_fit

Data: import and construction

Readers for CSV/Excel/PQMethod/Ken-Q/KADE/HTMLQ, the qsort_data object, and the shipped example panel.

Demonstration and synthetic panels

A fast demonstration fit, synthetic panels with known truth, and recovery measures for method checks.

demo_fit()
A small demonstration fit
generate_data() generate_loadings() generate_noise() discretize_to_grid() get_distribution()
Simulate Q-sort data
assess_recovery() assess_classification()
Simulation-study assessment helpers
tucker_congruence() procrustes_rotation()
Tucker's congruence and orthogonal Procrustes rotation

Defunct