Population and covariates#
Use model.set_population() before model.prepare() to define groups
and trait scales, or pass PopulationSpec directly to model.prepare(). Use
Model.add_regressions() to add predictors of abilities or eligible
measurement parameters. Feature tables use the entity IDs in the prepared design.
After preparation, call model.available_covariate_targets() to see the
selectors and feature tables for that design. For example, inspect the rows
for comparison cutpoints before adding a pair-level predictor:
model.available_covariate_targets(level="pair", kind="regression")
For groups with distinct means on a common residual scale, set
theta_correlation="shared" and set theta_residual_scale="unit".
Trait population priors, grouping and residual-scale identification. |
|
Declare a fixed-effect RHS and its entity feature table. |
|
Editor metadata for Regression's keyword options. |
|
List eligible covariate targets and their required predictor table. |
|
Replace selected role formulas atomically before estimation. |
Register a grouped population#
- Model.set_population(
- *,
- group: str | None = None,
- reference_group: str | int | None = None,
- person_data: pd.DataFrame | None = None,
- theta_residual_scale: Literal['unit', 'group'] | None = None,
- theta_correlation: Literal['group', 'shared'] = 'group',
- regression_by_group: bool = False,
- priors: Mapping[str, TensorVariable] | None = None,
Register a population and optional respondent table before preparation.
Call before preparation. Supply a person table keyed by person_id.
Repeated calls replace the pending declaration. With a group column, the
default estimates means and residual scales outside the reference group,
and estimates one trait correlation matrix per group.