JuliaPsychometrics / ItemResponsePlots.jl

Visualizations for item response models with Makie.jl
https://juliapsychometrics.github.io/ItemResponsePlots.jl/
MIT License
3 stars 0 forks source link

Release preparation #11

Closed p-gw closed 1 year ago

p-gw commented 1 year ago

closes #8 closes #3 closes #7

p-gw commented 1 year ago

I have added itemplot and testplot as well. Both display the characteristic curve on the left and information curve on the right side. itemplot seems fine, but I don't like the name testplot at all. Do you have any better suggestions @t-alfers?

itemplot

itemplot

testplot

testplot

p-gw commented 1 year ago

Here is some code if you want to try it yourself:

using RaschModels
using GLMakie
using ItemResponsePlots

# Dichotomous
data = rand(0:1, 50, 3)
rasch_mcmc = fit(RaschModel, data, NUTS(), 1000)
rasch_mle = fit(RaschModel, data, CML())

itemplot(rasch_mcmc, 1)
itemplot(rasch_mle, 1)

testplot(rasch_mcmc)
testplot(rasch_mle)

# Polytomous
data = rand(1:4, 50, 3)
rsm = fit(RatingScaleModel, data, NUTS(), 1000)

itemplot(rsm, 1, uncertainty_type = nothing)

partial_credit(k, K = 4) = (k - 1)/(K - 1) 
testplot(
    rsm, 
    scoring_function = partial_credit, 
    uncertainty_type = :interval, 
    quantiles = (0.025, 0.975)
)