API reference#
For a first fit, follow the Quick start. For R, see the R API reference.
Prepare data#
API |
Purpose |
|---|---|
Start an analysis. |
|
Load bundled data for an example or practice analysis. |
|
Register a forced-choice design and its responses. |
|
Register a design and responses for binary or rating items. |
|
Validate the design and responses and prepare the model for fitting. |
|
Check numbers of respondents, administered units, answers, and missing responses. |
|
Inspect observed response records. |
See observed response distributions for counts, proportions, and plots.
Configure and fit a model#
API |
Purpose |
|---|---|
Review the prepared model, its data, and its parameter settings. |
|
Override selected default priors. |
|
Find the parameters that can use covariates and the tables they need. |
|
Add covariates to trait scores or measurement parameters. |
|
Register the person table and group-specific trait distributions. |
|
Add respondent predictors to selected measurement parameters, with sample-size and group scaling for the default truncated L1 loading strength (experimental). |
|
Check which response patterns the priors imply before fitting. |
|
Fit the model and obtain posterior draws. |
Check sampling and model fit#
API |
Purpose |
|---|---|
Generate replicated responses to compare with observed answers. |
|
Select observed and replicated answers for one block or item. |
|
Run a posterior predictive check for categorical responses using a Pearson discrepancy. |
|
Plot results of the posterior predictive check. |
|
Calculate observed-minus-expected responses to locate discrepancies. |
For convergence diagnostics, use ArviZ summary
or rank and distribution plots
with model.idata.
Compare models#
API |
Purpose |
|---|---|
Obtain pointwise log likelihoods for the observed responses. |
|
Estimate expected predictive accuracy from pointwise log likelihoods. |
|
Compute the deviance information criterion from pointwise log likelihoods. |
Use the same observations and likelihood units when comparing models.
Interpret and report results#
API |
Purpose |
|---|---|
Summarize measurement parameters and their posterior uncertainty. |
|
Summarize posterior DIF contrasts between respondent profiles (experimental). |
|
Summarize population trait means, standard deviations, and correlations. |
|
Access the posterior draws for each respondent’s trait scores. |
|
Plot the posterior distributions of selected trait scores. |
|
Evaluate how much measurement information the responses provide at a trait level. |
|
Estimate score reliability from posterior trait scores and their uncertainty. |
Score new respondents or simulate data#
API |
Purpose |
|---|---|
Estimate trait scores for new respondents using an existing calibration. |
|
Build a new-respondent scoring model for inspection or a chosen estimator. |
|
Generate responses using the current design and specified parameter source. |
Save and reuse results#
API |
Purpose |
|---|---|
Save posterior draws and stored analysis outputs. |
|
Attach saved posterior draws to a matching prepared model. |
Advanced modeling#
Use population and covariate specifications for groups and regression formulas.
Use
model.build()and measurement distributions to work with native PyMC models.See posterior approximation for experimental scoring with calibration uncertainty and recursive updates.
Developer reference#
The parameter and coordinate contract describes prepared layouts, parameter identities and stored coordinates for integrations.
See troubleshooting for installation and runtime errors.