GTUM#
- class pyfcirt.GTUM(
- *,
- priors: Mapping[str, TensorVariable] | None = None,
- link: Literal['logit', 'beta_logit'] = 'logit',
- block_effect: bool = False,
Ideal-point pair comparisons with utility determined by distance.
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.link: {“logit”, “beta_logit”}Ordinary unscaled logit (default), or Beta with a logit mean. Beta needs a
UnitIntervalScaleand an explicit positiveresponse_precisionprior.block_effect: boolInclude a respondent-by-block effect when a block has more than two statements. Default:
False. The Beta link does not support this effect.
Returns#
- GTUM
A measurement declaration for
FCInput(..., model=declaration). Pass the configured declaration as themodelvalue when loading a bundled dataset.
Notes#
Use the design’s location_side to distinguish positive, negative and
unrestricted locations. Binary or graded pair responses have separate
comparison factors; pairs derived from ranks use a composite likelihood.
Default priors for active roles:
Prior role |
Default law |
|---|---|
|
LogNormal(mu=0, sigma=0.5) |
|
TruncatedNormal(mu=2, sigma=1, lower=0, upper=inf) |
|
TruncatedNormal(mu=-2, sigma=1, lower=-inf, upper=0) |
|
Normal(mu=0, sigma=1) |
|
Normal(mu=0, sigma=1) |
|
HalfNormal(loc=0, scale=1) |
|
Normal(mu=0, sigma=1) |
Examples#
import pyfcirt as fc
declaration = fc.GTUM()
example = fc.load_example("simulated_gtum", model=declaration, n_persons=3)
prepared = fc.PreparedInputs.from_inputs(example.data)
print(fc.data_coverage(prepared).to_string())
n_blocks size n_persons n_answered n_missing
model_response_format
GTUM 24 3 3 72 0