JuliaPsychometrics / AbstractItemResponseModels.jl

An API for item response modelling in Julia
https://juliapsychometrics.github.io/AbstractItemResponseModels.jl/
MIT License
4 stars 0 forks source link

Refactor location fetching #21

Open p-gw opened 3 months ago

p-gw commented 3 months ago

Fetching person and item locations using the current interface does not work for the intended use case. The reason is that in order to fetch all items with getitemlocations(m, i) all items i must be known.

However, downstream packages cannot know the implemented ids (e.g. from RaschModels) or item parameters (e.g. from ItemResponseFunctions`).

To fetch all items we need another function signature getitemlocations(m) without the need to specify the item indices.

p-gw commented 1 month ago

Another possibility is to keep the current interface and require an additional iterator over items (and persons) such as,

m = MyModel()

for i in eachitem(m)
    getitemlocations(m, i)
end

However it is not so clear what exactly eachitem iterates. Is it item indexes, item estimates, or something completely different?