The hardware and bandwidth for this mirror is donated by dogado GmbH, the Webhosting and Full Service-Cloud Provider. Check out our Wordpress Tutorial.
If you wish to report a bug, or if you are interested in having us mirror your free-software or open-source project, please feel free to contact us at mirror[@]dogado.de.

Type: Package
Title: Extended Graphical Model Checks for the Rasch Family of Models
Version: 0.9-2
Date: 2026-03-06
Description: The function plotLRT() draws pairwise graphical model checks for the Rasch Model (RM; Rasch, 1960), the Partial Credit Model(PCM; Masters, 1982), and the Rating Scale Model (RSM; Andrich, 1978) using the output object of eRm::LRtest(). The function cLRT() provides a conditional Likelihood Ratio Test (Andersen, 1973), using the routines of 'psychotools'. Users may choose to plot the threshold parameters, the cumulative thresholds, the average thresholds per item, or the person parameters. Extended coloring options allow for automated item-wise or threshold-wise coloring. For multi-group splits, all pairwise group comparisons are drawn automatically. For more details see Andersen (1973) <doi:10.1007/BF02291180>, Andrich (1978) <doi:10.1007/BF02293814>, Masters (1982) <doi:10.1007/BF02296272> and Rasch (1960, ISBN:9780598554512).
Depends: R (≥ 3.0.0)
License: GPL (≥ 3)
Imports: psychotools
Suggests: eRm
NeedsCompilation: no
Packaged: 2026-03-06 07:14:46 UTC; aa
Author: Rainer W. Alexandrowicz [aut, cre]
Maintainer: Rainer W. Alexandrowicz <rainer.alexandrowicz@aau.at>
Repository: CRAN
Date/Publication: 2026-03-10 19:50:02 UTC

Conditional Likelihood Ratio Test (cLRT) using psychotool's routines

Description

Calculates the cLRT and delivers subgroup's estimates for further processing with plotLRT().

Usage

cLRT(dat, splitcr = "median", model = "PCM", print = TRUE, ...)

Arguments

dat

The data set (matrix or data.frame) to be evaluated.

splitcr

The split criterion. One of the following:

  • the keyword "median"

  • the keyword "all.r"

  • a single numeric (s) indicating r <= s vs. r > s

  • a vector of length n with each row's group allocation.

model

The model to be applied. May either contain the model's name (i.e., "RM","PCM", or "RSM") or the respective function name (i.e., "raschmodel()", "pcmodel()","rsmodel()").

print

(logical) Print the cLRT result to the console (default TRUE).

...

Further arguments to be passed to the estimation routines.

Value

cLRT returns an object of class cLRT with the elements

Author(s)

Rainer W. Alexandrowicz

Examples


 library(eRm)
 data(pcmdat2)

 mod = cLRT(pcmdat2)   # psychotools based (defaults: PCM, median split)
 plotLRT(mod)

Extended Graphical Model Checks for multi-group splits of RM/PCM/RSM

Description

Draws pairwise graphical model checks for RM/PCM/RSM using the output object of eRm::LRtest() or GMX::clrt(). Supports threshold parameters, cumulative threshold parameters, mean of threshold parameters, or person parameters of the split groups.

Usage

gmx(...)

Arguments

...

Any argument valid for plotLRT.

Details

The function gmx() is superseded by plotLRT() as of version 0.9-2 of GMX, which is the first version made available on CRAN (for previous versions see https://osf.io/2ryd8/. It is included for backward compatibility. The options of both functions are identical, in fact, any call to gmx() is forwarded to plotLRT().

Value

gmx() returns a data.frame with the parameters used for plotting (i.e., the selected thresholds, cumulative thresholds, mean item parameters, or thetas).

Author(s)

Rainer W. Alexandrowicz

Examples


 library(eRm)
 data(pcmdat2)

 mod = PCM(pcmdat2)                               # eRm based
 grp = rep(1:3, each=100)
 tst = LRtest(mod, splitcr=grp)

 gmx(tst)

Extended Graphical Model Checks for multi-group splits of RM/PCM/RSM

Description

Draws pairwise graphical model checks for RM/PCM/RSM using the output object of eRm::LRtest() or GMX::clrt(). Supports threshold parameters, cumulative threshold parameters, mean of threshold parameters, or person parameters of the split groups.

Usage

plotLRT(
  lrtobj,
  type = c("thresholds", "cumulative", "means", "perspar", "betas"),
  isel = NULL,
  psel = NULL,
  gsel = NULL,
  nc = 3,
  ds = 4,
  dotcol = "dodgerblue",
  regcol = "dodgerblue3",
  regline = TRUE,
  pch = 16,
  xlim = NULL,
  ylim = NULL,
  EQlims = TRUE,
  glabs = "auto",
  tlabs = c("none", "numbers", "names", "identify"),
  title = "none",
  annot = c("r", "LRT"),
  confell = TRUE,
  conferr = 0.05,
  confcol = grey(0.8),
  extwin = TRUE,
  parskip = FALSE,
  ...
)

Arguments

lrtobj

Output object of a previous call to eRm::LRtest or GMX::clrt().

type

Plot "betas", "thresholds" (PCM & RSM only), or person parameters ("perspar"). May be abbreviated. See details.

isel

Item selection: Vector of item numbers to plot (includes all parameters of the selected items). Takes precedence over psel and is ignored if type=perspar.

psel

Parameter selection: Vector of parameter numbers to plot. Ignored if type=perspar.

gsel

Group selection: which subgroups to plot (numeric vector).

nc

Number of columns of the combined plot. The number of rows is determined automatically from the number of split groups.

ds

Diagram size of each single diagram. Defaults to 7x7 inch for a two-group split and 4 x 4 inch for a multi-group split.

dotcol

Dot color. May be a vector of length(number of parameters) for distinguishing parameter groups (e.g., if items belong to different domains). It also accepts the keywords "items" for using the same color for all parameters per item and "thresholds" for using the same colors for all first/second/... parameters per item.

regcol

Color of regression line (vertical group ~ horizontal group)

regline

(logical) Shall the regression line be drawn?

pch

Point character. May be a vector (see col).

xlim

Manually set limits of the horizontal axes (if EQlims=FALSE).

ylim

Manually set limits of the vertical axes (if EQlims=FALSE).

EQlims

Force horizontal and vertical axes to share the same range. (i.e., xlim=ylim). Uses +/-1.2 times the maximum value of all split groups. Takes precedence over xlim and ylim.

glabs

Vector of group labels or keyword "auto" to use the labels provided by LRtest. (Note: Use a factor for the LRtest split criterion, although the documentation of LRtest also permits character vectors.)

tlabs

Either a keyword defining point labelling: "none" = no labels, "numbers" = consecutive numbers of parameters, "names" = paramter names as provided by LRtest, "identify" = Interactive labelling (see ?eRm::plotGOF), or a vector with user-provided labels. Keywords may be abbreviated.

title

Either keyword "none" (default) to omit a title, keyword "auto" to print the test statistic/df/p-value of the LRT, or a custom title string.

annot

A string vector containing the strings "r" and/or "LRT": "r" prints the correlation of the plotted parameters and"LRT" the test statistic, the df, and the p-value of the LRT (the latter only in the top left diagram for multiple group splits).

confell

(logical). Draw confidence ellipses.

conferr

Probability of an error of the first kind used for the confidence ellipses.

confcol

Color of the confidence ellipses. The keyword "auto" will use the point colors (default: grey(.8)).

extwin

(logical) Draw diagram(s) into an external window (for better compatibility with RStudio; default: TRUE)

parskip

Skip internal settings for graphical options (par=) to take full control; default: FALSE.

...

Further arguments to be passed to plot().

Details

Changes in version 0.9 of GMX:

Value

plotLRT() returns a data.frame with the parameters used for plotting (i.e., the selected thresholds, cumulative thresholds, mean item parameters, or thetas).

Author(s)

Rainer W. Alexandrowicz

Examples


 library(eRm)
 data(pcmdat2)

 mod = PCM(pcmdat2)                               # eRm based
 grp = rep(1:3, each=100)
 tst = LRtest(mod, splitcr=grp)

 plotLRT(tst)                                     # thresholds (default)
 plotLRT(tst,type="p")                            # person parameters

 col = rep(c("deepskyblue","firebrick2","green3","steelblue"),each=2)
 plotLRT(tst,type="t",dotcol=col,cex=2)           # distinguish items
 plotLRT(tst,type="t",dotcol=col,cex=2,confcol=col,tlab="nam")

 col = rep(c("steelblue1","orangered2"),4)        # distinguish thresholds
 plotLRT(tst,type="t",dotcol=col,cex=2, confcol=col, tlab="nam")

 palette(c("deepskyblue","firebrick2","green3","steelblue"))
 plotLRT(tst,type="t",dotcol="items",cex=2,tlab="nam")   # auto-distinguish items

 palette(c("steelblue1","orangered2"))            # auto-distinguish thresholds
 plotLRT(tst,type="t",dotcol="thresholds",cex=2,tlab="nam")

 pp = plotLRT(tst,type="p",dotcol=rainbow(7))
 t(apply(pp,1,diff))                              # group differences of thetas

 plotLRT(tst,type="t",tlab="nam",isel=1)          # plot only first item
 plotLRT(tst,type="t",tlab="nam",isel=c(2,3))     # plot items 2 and 3

 plotLRT(tst,type="t",tlab="nam",psel=c(1,3,5,7)) # plot threshold 1 of all items


 mod = cLRT(pcmdat2)                              # psychotools based
 plotLRT(mod)
 plotLRT(mod,type="p")

These binaries (installable software) and packages are in development.
They may not be fully stable and should be used with caution. We make no claims about them.
Health stats visible at Monitor.