Skip to content

Commit 85807fb

Browse files
author
Frankie Robertson
committed
Add more flexibility to the mirtcat_next_item_aliases
1 parent 0b11a9f commit 85807fb

File tree

1 file changed

+30
-24
lines changed

1 file changed

+30
-24
lines changed

src/next_item_rules/aliases.jl

Lines changed: 30 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,7 @@ const catr_next_item_aliases = Dict(
1212
"MEPV" => (ability_estimator; parallel = true) -> ItemStrategyNextItemRule(
1313
ExhaustiveSearch1Ply(parallel),
1414
ExpectationBasedItemCriterion(ability_estimator,
15-
AbilityVarianceStateCriterion(ability_estimator)))
16-
#"MLWI",
17-
#"MPWI",
18-
#"MEI",
15+
AbilityVarianceStateCriterion(ability_estimator))) #"MLWI", #"MPWI", #"MEI",
1916
)
2017

2118
#"thOpt",
@@ -27,22 +24,31 @@ const catr_next_item_aliases = Dict(
2724
#"GDIP",
2825
#"random"
2926

27+
function _mirtcat_helper(item_criterion_callback)
28+
function _helper(bits...; ability_estimator = nothing)
29+
ability_estimator = AbilityEstimator(bits...; ability_estimator = ability_estimator)
30+
item_criterion = item_criterion_callback(
31+
[bits..., ability_estimator], ability_estimator)
32+
return ItemStrategyNextItemRule(ExhaustiveSearch1Ply(), item_criterion)
33+
end
34+
return _helper
35+
end
36+
3037
const mirtcat_next_item_aliases = Dict(
3138
# "MI' for the maximum information
32-
"MI" => (ability_estimator) -> ItemStrategyNextItemRule(
33-
ExhaustiveSearch1Ply(false),
34-
InformationItemCriterion(ability_estimator)),
39+
"MI" => _mirtcat_helper((bits, ability_estimator) -> InformationItemCriterion(ability_estimator)),
3540
# 'MEPV' for minimum expected posterior variance
36-
"MEPV" => (ability_estimator) -> ItemStrategyNextItemRule(
37-
ExhaustiveSearch1Ply(false),
38-
ExpectationBasedItemCriterion(ability_estimator,
39-
AbilityVarianceStateCriterion(ability_estimator))),
40-
# 'MLWI' for maximum likelihood weighted information
41-
#"MLWI" =>
42-
# 'MPWI' for maximum posterior weighted information
43-
# 'MEI' for maximum expected information
44-
# 'IKLP' as well as 'IKL' for the integration based Kullback-Leibler criteria with and without the prior density weight,
45-
# respectively, and their root-n items administered weighted counter-parts, 'IKLn' and 'IKLPn'.
41+
"MEPV" => _mirtcat_helper((bits, ability_estimator) -> ExpectationBasedItemCriterion(
42+
ability_estimator,
43+
AbilityVarianceStateCriterion(bits...)))
44+
)
45+
46+
# 'MLWI' for maximum likelihood weighted information
47+
#"MLWI" => _mirtcat_helper((bits, ability_estimator) -> InformationItemCriterion(ability_estimator))
48+
# 'MPWI' for maximum posterior weighted information
49+
# 'MEI' for maximum expected information
50+
# 'IKLP' as well as 'IKL' for the integration based Kullback-Leibler criteria with and without the prior density weight,
51+
# respectively, and their root-n items administered weighted counter-parts, 'IKLn' and 'IKLPn'.
4652
#=
4753
Possible inputs for multidimensional adaptive tests include: 'Drule' for the
4854
maximum determinant of the information matrix, 'Trule' for the maximum
@@ -57,21 +63,21 @@ design object
5763
Non-adaptive methods applicable even when no mo object is passed are: 'random'
5864
to randomly select items, and 'seq' for selecting items sequentially
5965
=#
60-
)
6166

6267
const mirtcat_ability_estimator_aliases = Dict(
68+
# "MAP" for the maximum a-posteriori (i.e, Bayes modal)
69+
# "ML" for maximum likelihood
70+
# "WLE" for weighted likelihood estimation
71+
# "EAPsum" for the expected a-posteriori for each sum score
72+
# "EAP" for the expected a-posteriori (default).
73+
)
74+
6375
#=
64-
• "MAP" for the maximum a-posteriori (i.e, Bayes modal)
65-
• "ML" for maximum likelihood
66-
• "WLE" for weighted likelihood estimation
67-
• "EAPsum" for the expected a-posteriori for each sum score
6876
• "plausible" for a single plausible value imputation for each case. This is
6977
equivalent to setting plausible.draws = 1
7078
• "classify" for the posteriori classification probabilities (only applicable
7179
when the input model was of class MixtureClass)
7280
=#
73-
# "EAP" for the expected a-posteriori (default).
74-
)
7581

7682
function mirtcat_quadpts(nfact)
7783
if nfact == 1

0 commit comments

Comments
 (0)