plot.difORD | R Documentation |
"difORD"
class.Plot method for an object of "difORD"
class
using ggplot2.
The characteristic curves (category probabilities) for an item
specified in item
argument are plotted. Plotted curves
represent the best model. For cumulative logit model, also
cumulative probabilities may be plotted.
## S3 method for class 'difORD'
plot(x, item = "all", plot.type, group.names, ...)
x |
an object of |
item |
numeric or character: either character |
plot.type |
character: which plot should be displayed for
cumulative logit regression model. Either |
group.names |
character: names of reference and focal group. |
... |
other generic parameters for |
Returns list of objects of class "ggplot"
.
Adela Hladka (nee Drabinova)
Institute of Computer Science of the Czech Academy of Sciences
Faculty of Mathematics and Physics, Charles University
hladka@cs.cas.cz
Patricia Martinkova
Institute of Computer Science of the Czech Academy of Sciences
martinkova@cs.cas.cz
difORD
for DIF detection among ordinal data.
ggplot
for general function to plot a "ggplot"
object.
## 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 adjacent category logit model
(x <- difORD(Data, group, focal.name = 1, model = "adjacent"))
# graphical devices
plot(x, item = 6)
plot(x, item = "R6", group.names = c("Males", "Females"))
# testing both DIF effects with cumulative logit model
(x <- difORD(Data, group, focal.name = 1, model = "cumulative"))
plot(x, item = 7, plot.type = "cumulative")
plot(x, item = 7, plot.type = "category")
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.