predict.difORD {difNLR} | R Documentation |
"difORD"
class.S3 method for predictions from the model used in the
object of "difORD"
class.
## S3 method for class 'difORD' predict(object, item = "all", match, group, type = "category", ...)
object |
an object of |
item |
numeric or character: either character |
match |
numeric: matching criterion for new observations. |
group |
numeric: group membership for new observations. |
type |
character: type of probability to be computed. Either
|
... |
other generic parameters for |
Adela Hladka (nee Drabinova)
Institute of Computer Science of the Czech Academy of Sciences
hladka@cs.cas.cz
Patricia Martinkova
Institute of Computer Science of the Czech Academy of Sciences
martinkova@cs.cas.cz
Hladka, A. & Martinkova, P. (2020). difNLR: Generalized logistic regression models for DIF and DDF detection. The R Journal, 12(1), 300–323, doi: 10.32614/RJ-2020-014.
difORD
for DIF detection among ordinal data using either cumulative logit or adjacent category logit model.
predict
for generic function for prediction.
## Not run: # loading data data(dataMedicalgraded, package = "ShinyItemAnalysis") Data <- dataMedicalgraded[, 1:5] # items group <- dataMedicalgraded[, 101] # group membership variable match <- rowSums(dataMedicalgraded[, 1:100]) # matching criterion # testing both DIF effects with cumulative logit model (x <- difORD(Data, group, match = match, focal.name = 1, model = "cumulative")) # fitted values predict(x, item = "X2003") # predicted values predict(x, item = "X2003", match = 350, group = c(0, 1)) predict(x, item = "X2003", match = 350, group = c(0, 1), type = "cumulative") predict(x, item = c("X2001", "X2003"), match = 350, group = c(0, 1)) # testing both DIF effects with adjacent category logit model (x <- difORD(Data, group, match = match, focal.name = 1, model = "adjacent")) # fitted values predict(x, item = "X2003") # predicted values predict(x, item = "X2003", match = 350, group = c(0, 1)) predict(x, item = c("X2001", "X2003"), match = 350, group = c(0, 1)) ## End(Not run)