plotDIF {eRm}R Documentation

Confidence intervals plot of item parameter estimates.


Performs an plot of item parameter conficence intervals based on LRtest subgroup splitting.


plotDIF(object, item.subset = NULL, gamma = 0.95, main = NULL,
          xlim = NULL,  xlab = " ", ylab=" ", col = NULL,
          distance, splitnames=NULL, leg = FALSE, legpos="bottomleft", ...)



An object of class LR (if more objects should be plotted, the argument has to be defined as a list).


Subset of items to be plotted. Either a numeric vector indicating the items or a character vector indicating the itemnames. If nothing is defined (default), all items are plotted.


The level for the item parameter's confidence limits (default is gamma = 0.95).


Main title for the plot.


Numeric vector of length 2, giving the x coordinates ranges of the plot (the y coordinates depend on the number of depicted items).


Label for the x axis.


Label for the y axis.


By default the color for the drawn confidence lines is determined automatically whereas every group (split criterion) is depicted in the same color.


Distance between each item's confidence lines – if omitted, the distance shrinks with increasing numbers of split criteria. Can be overriden using values in (0, 0.5).


For labeling the splitobjects in the legend (returns a nicer output).


If TRUE a legend is provided by default.


Position of the legend with possible values "bottomright", "bottom", "bottomleft", "left", "topleft", "top", "topright", "right" and "center". The default value for the legend is "bottomleft".


Further options to be passed to plot.


If there are items that cannot be estimated for some reasons, certainly these ones are not plotted. For plotting several objects of class LR, the subgroup splitting by LRtest has to be carried out for the same data set (or at least item subsets of it).

Plotting a certain subset of items could be useful if the objects of class LR contain a huge number of estimated items.

The default level for the conficence limits is gamma = 0.95. (If the conficence limits should be corrected it is useful to use a correction, e.g., Bonferroni: 1 - (1 - gamma) / number of estimated items.)


plotCI returns a list containing the confidence limits of each group in each LRtest object.


Kathrin Gruber, Reinhold Hatzinger

See Also

LRtest, confint.threshold, thresholds


# the object used is the result of running   RM(raschdat1)
res <- raschdat1_RM_fitted     # see ? raschdat1_RM_fitted

## Not run: 
# LR-test on dichotomous Rasch model with user-defined split
splitvec <- rep(1:2, each = 50)
lrres <- LRtest(res, splitcr = splitvec)

# LR-test with mean split
lrres2 <- LRtest(res, split = "mean")

# combination of LRtest-objects in a list
RMplotCI <- list(lrres, lrres2)
## End(Not run)

# the object raschdat1_RM_plotDIF is the result of the computations outlined
# above and is loaded to save computation time. see ?raschdat1_RM_plotDIF
RMplotCI <- raschdat1_RM_plotDIF

# Confidence intervals plot with default assumptions

# Confidence intervals plot with Bonferroni correction
plotDIF(RMplotCI, gamma = (1 - (0.05/10)))

# Confidence intervals plot for an item subset
plotDIF(RMplotCI, item.subset = 1:6)

# with user defined group color and legend
plotDIF(RMplotCI, col = c("red", "blue"), leg = TRUE, legpos = "bottomright")

# with names for the splitobjects
plotDIF(RMplotCI, col = c("red", "blue"), leg = TRUE, legpos = "bottomright",
        splitnames = c(paste("User", 1:2), paste(rep("Mean", 2), 1:2)))

[Package eRm version 1.0-2 Index]