Calculates DDF likelihood ratio statistics for nominal data based on multinomial log-linear model.
MLR(Data, group, key, type = "both", match = "zscore", anchor = 1:ncol(Data),
p.adjust.method = "none", parametrization = "irt", alpha = 0.05)
character: the unscored data matrix.
numeric or character: the binary vector of group membership
character: the answer key.
character: type of DDF to be tested (either "both"
(default), "udif"
, or "nudif"
).
See Details.
specifies matching criterion. Can be either "zscore"
(default, standardized total score),
"score"
(total test score), or vector of the same length as number of observations in Data
. See Details.
a vector of integers specifying which items are currently considered as anchor (DDF free) items. By
default, all items are considered as anchors. Argument is ignored if match
is not "zscore"
or "score"
.
See Details.
character: method for multiple comparison correction. See Details.
character: parametrization of regression coefficients. Possible options are
"irt"
(default) and "classic"
. See Details.
numeric: significance level (default is 0.05).
A list with the following arguments:
Sval
the values of likelihood ratio test statistics.
pval
the p-values by likelihood ratio test.
adj.pval
the adjusted p-values by likelihood ratio test using p.adjust.method
.
df
the degress of freedom of likelihood ratio test.
par.m0
the estimates of null model.
par.m1
the estimates of alternative model.
se.m0
standard errors of parameters in null model.
se.m1
standard errors of parameters in alternative model.
ll.m0
log-likelihood of m0 model.
ll.m1
log-likelihood of m1 model.
AIC.m0
AIC of m0 model.
AIC.m1
AIC of m1 model.
BIC.m0
BIC of m0 model.
BIC.m1
BIC of m1 model.
Calculates DDF likelihood ratio statistics based on multinomial log-linear model.
The Data
is a matrix which rows represents examinee unscored answers and
columns correspond to the items. The group
must be a vector of the same
length as nrow(Data)
. The key
must be a vector of correct answers
corresponding to columns of Data
.
The type
corresponds to type of DDF to be tested. Possible values are "both"
to detect any DDF (uniform and/or non-uniform), "udif"
to detect only uniform DDF or
"nudif"
to detect only non-uniform DDF.
Argument match
represents the matching criterion. It can be either the standardized test score (default, "zscore"
),
total test score ("score"
), or any other continuous or discrete variable of the same length as number of observations
in Data
. Matching criterion is used in NLR
function as a covariate in non-linear regression model.
The p.adjust.method
is a character for p.adjust
function from the
stats
package. Possible values are "holm"
, "hochberg"
,
"hommel"
, "bonferroni"
, "BH"
, "BY"
, "fdr"
, "none"
.
See also p.adjust
for more information.
Argument parametrization
is a character which specifies parametrization of regression parameters. Default option
is "irt"
which returns IRT parametrization (difficulty-discrimination). Option "classic"
returns
intercept-slope parametrization with effect of group membership and interaction with matching criterion.
# NOT RUN {
# loading data based on GMAT
data(GMATtest, GMATkey)
Data <- GMATtest[, 1:20]
group <- GMATtest[, "group"]
key <- GMATkey
# Testing both DDF effects
MLR(Data, group, key, type = "both")
# Testing uniform DDF effects
MLR(Data, group, key, type = "udif")
# Testing non-uniform DDF effects
MLR(Data, group, key, type = "nudif")
# }
# NOT RUN {
# }
Run the code above in your browser using DataLab