generation_schedule#
- pyfcirt.generation_schedule(
- model: Model,
- person_ids: Sequence,
- *,
- person_data=None,
Schedule unanswered administrations on a prepared design for new respondents.
Parameters#
model: ModelPrepared reference model. A fitted posterior is optional.
person_ids: sequenceNonempty unique string or integer IDs, in the desired generation order.
person_data: pandas.DataFrame or NoneNew people’s group labels and predictor values when the reference model uses them. Match one row to each requested ID.
Returns#
- xarray.Dataset
New person and
schedulecoordinates. Eachscheduleentry is one scheduled block, pair or item event. Pass it tosimulate(administration=...).
Notes#
The schedule contains no answers. Events follow the requested person order and then the prepared unit and pair order. The schedule is independent of the reference model.
Examples#
import pyfcirt as fc
bundle = fc.load_example("simulated_mirt", model="DichotomousIRT", n_persons=2)
template = fc.Model().prepare(bundle.data)
schedule = fc.generation_schedule(template, person_ids=["new1", "new2"])
print({axis: schedule.sizes[axis] for axis in ("person", "unit", "schedule")})
{'person': 2, 'unit': 8, 'schedule': 16}