TIRTRank#
- class pyfcirt.TIRTRank(
- *,
- priors: Mapping[str, TensorVariable] | None = None,
- loading_anchors: Mapping | None = None,
- reference_statements: tuple = (),
Joint Gaussian probabilities for full and partial ranking events.
Parameters#
priors: mapping or NoneOverride local prior roles with unnamed PyMC distributions such as
pm.Normal.dist(mu=0, sigma=1).Noneuses the defaults below.loading_anchors: mapping or NoneStatement IDs and positive fixed loadings. The default uses the design’s anchors. Add references if preparation flags a missing anchor.
reference_statements: tupleIDs of statements with zero intercepts.
()lets preparation choose references.
Returns#
- TIRTRank
A measurement declaration for
FCInput(..., model=declaration). Pass the configured declaration as themodelvalue when loading a bundled dataset.
Notes#
Declare "rank", "pick" or "mole" in the design. Fitting uses a Gaussian
contrast constrained to the observed event. Prediction and pointwise log
likelihood use its marginal event probability.
Default priors for active roles:
Prior role |
Default law |
|---|---|
|
LogNormal(mu=0, sigma=0.5) |
|
Normal(mu=0, sigma=1) |
|
HalfNormal(loc=0, scale=1) |
Examples#
import pyfcirt as fc
declaration = fc.TIRTRank()
example = fc.load_example("hexaco_fc3", model=declaration, n_persons=3)
model = fc.Model()
model.add_fc(
example.data.design,
example.data.responses.frame,
format="block_long",
response_format="mole",
model=declaration,
)
model.prepare()
print(model.data_coverage().to_string())
n_blocks size n_persons n_answered n_missing
model_response_format
TIRTRank / mole 20 3 3 60 0