Model.available_covariate_targets#
- Model.available_covariate_targets(
- level: Literal['person', 'statement', 'pair', 'item', 'measurement'] | None = None,
- *,
- kind: Literal['regression', 'dif'] | None = None,
List the covariate targets available in a prepared design.
Parameters#
level: {“person”, “statement”, “pair”, “item”, “measurement”} or NoneFilter by the level of the parameter being predicted. By default, show all levels. A scalar for a measurement unit, such as GTUM Beta response precision, uses
"measurement".kind: {“regression”, “dif”} or NoneShow ordinary regressions, respondent-level measurement effects (DIF), or both by default.
Returns#
- pandas.DataFrame
Columns are
target,model,level,kind, andpredictor_level.modelis the measurement model name, or missing for the population targettheta.predictor_levelidentifies the table to supply. Use a string regression target on the left side of a formula, a tuple target as a key in a mapping of Regression declarations, and a DIF target inadd_dif_terms(). A valid filter with no matches returns an empty table with the same columns.
The query uses the design’s free parameters and identification constraints. It can run before or after fitting. Add the selected covariates before fitting.
Examples#
import pyfcirt as fc
example = fc.load_example("tirt_study", model="TIRT", n_persons=3)
model = fc.Model(example.data)
print(model.available_covariate_targets(level="pair").to_string(index=False))
target model level kind predictor_level
fc.cutpoints TIRT pair regression pair
fc.cutpoints TIRT pair dif person