predict.difORD {difNLR} | R Documentation |
Predicted values for an object of "difORD"
class.
Description
S3 method for predictions from the model used in the
object of "difORD"
class.
Usage
## S3 method for class 'difORD'
predict(object, item = "all", match, group, type = "category", ...)
Arguments
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 |
Author(s)
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
References
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.
See Also
difORD
for DIF detection among ordinal data using either cumulative logit or adjacent category logit model.
predict
for generic function for prediction.
Examples
## Not run:
# loading data
data(Anxiety, package = "ShinyItemAnalysis")
Data <- Anxiety[, paste0("R", 1:29)] # items
group <- Anxiety[, "gender"] # group membership variable
# testing both DIF effects with cumulative logit model
(x <- difORD(Data, group, focal.name = 1, model = "cumulative"))
# fitted values
predict(x, item = "R6")
# predicted values
predict(x, item = "R6", match = 0, group = c(0, 1))
predict(x, item = "R6", match = 0, group = c(0, 1), type = "cumulative")
predict(x, item = c("R6", "R7"), match = 0, group = c(0, 1))
# testing both DIF effects with adjacent category logit model
(x <- difORD(Data, group, focal.name = 1, model = "adjacent"))
# fitted values
predict(x, item = "R6")
# predicted values
predict(x, item = "R6", match = 0, group = c(0, 1))
predict(x, item = c("R6", "R7"), match = 0, group = c(0, 1))
## End(Not run)