Learn R Programming

conquestr (version 0.8.5)

plotDif: plotDif

Description

Creates a plot (ggplot2 object) of item parameter estimates common to two system files (e.g., a DIF analysis).

Usage

plotDif(mySysToItemDifDf, myScale = "centred", mySuffixes)

Arguments

mySysToItemDifDf

An R object of class data frame returned from conquestr::sysToItemDifDf

myScale

A string specifying if the item parameter estimates displayed should be "centred" (default), "scaled" (z scores), or "none" (raw).

mySuffixes

a vector of strings specifying the names for the two groups being analysed, e.g., if the two system files are an analysis of boys and girls, the vector may be `c(_male", "_female")`.

Value

A ggplot2 object.

See Also

conquestr::sysToItemDifDf()

Examples

Run this code
# NOT RUN {
mySys1<- ConQuestSys()
mySys2<- ConQuestSys()
mySysList<- list(mySys1, mySys2)
myDifDf<- sysToItemDifDf(mySysList, mySuffixes = c("_male", "_female"), myDims = "all")
myDifPlot<- plotDif(myDifDf,myScale = "centred", mySuffixes = c("_male", "_female"))
# }
# NOT RUN {
# if you run the above example you will have the plot in the object `myDifPlot`.
plot(myDifPlot)
# }

Run the code above in your browser using DataLab