Learn R Programming

difNLR (version 1.3.7)

plot.ddfMLR: ICC plots for an object of "ddfMLR" class.

Description

Plot method for an object of "ddfMLR" class using ggplot2.

The characteristic curves for an item specified in item argument are plotted. Plotted curves represent the best model.

Usage

# S3 method for ddfMLR
plot(x, item = "all", group.names, ...)

Arguments

x

an object of "ddfMLR" class.

item

numeric or character: either character "all" to apply for all items (default), or a vector of item names (column names of Data), or item identifiers (integers specifying the column number).

group.names

character: names of reference and focal group.

...

other generic parameters for plot() function.

Value

Returns list of objects of class "ggplot".

See Also

ddfMLR for DDF detection. ggplot for general function to plot a "ggplot" object.

Examples

Run this code
# NOT RUN {
# Loading data based on GMAT
data(GMATtest, GMATkey)

Data <- GMATtest[, 1:20]
group <- GMATtest[, "group"]
key <- GMATkey

# Testing both DDF effects
(x <- ddfMLR(Data, group, focal.name = 1, key))

# Graphical devices
plot(x, item = "Item1", group.names = c("Group 1", "Group 2"))
plot(x, item = x$DDFitems)
plot(x, item = 1)
# }

Run the code above in your browser using DataLab