# NOT RUN {
# loading data
data(dataMedicalgraded, package = "ShinyItemAnalysis")
Data <- dataMedicalgraded[, 1:5]
group <- dataMedicalgraded[, 101]
# Testing both DDF effects with adjacent category logit model
(x <- ddfORD(Data, group, focal.name = 1, model = "adjacent"))
# graphical devices
plot(x, item = 3)
plot(x, item = "X2003")
plot(x, item = "X2003", group.names = c("Group 1", "Group 2"))
# estimated parameters
coef(x)
coef(x, SE = T) # with SE
coef(x, SE = T, simplify = T) # with SE, simplified
# AIC, BIC, log-likelihood
AIC(x); BIC(x); logLik(x)
# AIC, BIC, log-likelihood for the first item
AIC(x, item = 1); BIC(x, item = 1); logLik(x, item = 1)
# Testing both DDF effects with Benjamini-Hochberg adjustment method
ddfORD(Data, group, focal.name = 1, model = "adjacent", p.adjust.method = "BH")
# Testing both DDF effects with item purification
ddfORD(Data, group, focal.name = 1, model = "adjacent", purify = T)
# Testing uniform DDF effects
ddfORD(Data, group, focal.name = 1, model = "adjacent", type = "udif")
# Testing non-uniform DDF effects
ddfORD(Data, group, focal.name = 1, model = "adjacent", type = "nudif")
# Testing both DDF effects with total score as matching criterion
ddfORD(Data, group, focal.name = 1, model = "adjacent", match = "score")
# Testing both DDF effects with cumulative logit model
# using IRT parametrization
(x <- ddfORD(Data, group, focal.name = 1, model = "cumulative", parametrization = "irt"))
# graphical devices
plot(x, item = 3, plot.type = "cumulative")
plot(x, item = 3, plot.type = "category")
# estimated parameters in IRT parametrization
coef(x, simplify = T)
# }
# NOT RUN {
# }
Run the code above in your browser using DataLab