ExampleData#
- class pyfcirt.ExampleData(
- data: FCInput | ItemInput | tuple[FCInput | ItemInput, ...],
- truth: xr.Dataset | None,
- metadata: Mapping,
- person_data: pd.DataFrame | None = None,
- response_times: pd.DataFrame | None = None,
Read the design, answers and optional companion tables returned by the dataset loader.
Parameters#
data: FCInput, ItemInput or tuple of bothFresh design and response declarations.
truth: xarray.Dataset or NoneOriginal generating arrays when available and requested.
metadata: mappingResource provenance and sample-selection information.
person_data: pandas.DataFrame or NoneMatched predictor or grouping table when supplied.
response_times: pandas.DataFrame or NoneMatched response-time table when supplied.
Returns#
- ExampleData
The bundle returned by
load_example(). Usebundle.datafor preparation and join any companion tables by their IDs.
Examples#
import pyfcirt as fc
bundle = fc.load_example("jrt_tirt", model="TIRT", n_persons=2)
print(bundle.response_times.head(3).to_string(index=False))
person_id block_id seconds
J001 B5 39.040037
J002 B2 43.381822
J001 B3 24.876910