ggExametrika
ggExametrika provides ggplot2-based visualization for the
exametrika package. It
supports a wide range of psychometric models:
| Model |
Description |
| IRT |
Item Response Theory (2PL, 3PL, 4PL) |
| GRM |
Graded Response Model |
| LCA |
Latent Class Analysis |
| LRA |
Latent Rank Analysis |
| LRAordinal |
Latent Rank Analysis for ordinal data |
| LRArated |
Latent Rank Analysis for rated data |
| Biclustering |
Simultaneous item/student clustering (binary) |
| nominalBiclustering |
Biclustering for nominal data |
| ordinalBiclustering |
Biclustering for ordinal data |
| IRM |
Infinite Relational Model |
| LDLRA |
Locally Dependent Latent Rank Analysis |
| LDB |
Locally Dependent Biclustering |
| BINET |
Bayesian Network and Test |
| BNM |
Bayesian Network Model |
Reference
Shojima, Kojiro (2022) Test Data Engineering: Latent Rank Analysis,
Biclustering, and Bayesian Network (Behaviormetrics: Quantitative
Approaches to Human Behavior, 13), Springer, ISBN 978-981-16-9985-6
Installation
install.packages("ggExametrika", repos = c('https://kosugitti.r-universe.dev', 'https://cloud.r-project.org'))
Examples
All plot functions take exametrika output directly and return ggplot
objects. Functions are named plotXXX_gg().
IRT: Item Characteristic Curve (plotICC_gg)
library(exametrika)
library(ggExametrika)
result_irt <- IRT(J15S500, model = 3)
plots <- plotICC_gg(result_irt)
plots[[5]]

combinePlots_gg(plots)

IRT: Overlay Plots (plotICC_overlay_gg, plotIIC_overlay_gg)
plotICC_overlay_gg(result_irt, show_legend = TRUE)
plotIIC_overlay_gg(result_irt, items = c(1, 3, 5), show_legend = TRUE)
IRT: Item Information Curve (plotIIC_gg)
plots <- plotIIC_gg(result_irt)
combinePlots_gg(plots, selectPlots = 8:11)

IRT: Test Information Curve / Test Response Function (plotTIC_gg, plotTRF_gg)
plotTIC_gg(result_irt)
plotTRF_gg(result_irt)
GRM: Item Category Response Function (plotICRF_gg)
result_grm <- GRM(J5S1000)
plots <- plotICRF_gg(result_grm)
plots[[1]]
combinePlots_gg(plots, selectPlots = 1:5)
plotIIC_gg(result_grm)
plotTIC_gg(result_grm)
LCA: Latent Class Analysis
result_lca <- LCA(J15S500, ncls = 3)
plotIRP_gg(result_lca)
plotFRP_gg(result_lca)
plotTRP_gg(result_lca)
plotLCD_gg(result_lca)
plotCMP_gg(result_lca)
LRA: Latent Rank Analysis
result_lra <- LRA(J15S500, nrank = 4)
plotIRP_gg(result_lra)
plotFRP_gg(result_lra)
plotTRP_gg(result_lra)
plotLRD_gg(result_lra)
plotRMP_gg(result_lra)
LRAordinal / LRArated
result_lra_ord <- LRA(J5S1000, nrank = 4)
plotScoreFreq_gg(result_lra_ord)
plotScoreRank_gg(result_lra_ord)
plotICRP_gg(result_lra_ord)
plotICBR_gg(result_lra_ord)
plotRMP_gg(result_lra_ord)
Biclustering (binary)
result_bic <- Biclustering(J35S515, nfld = 5, nrank = 6)
plotFRP_gg(result_bic)
plotTRP_gg(result_bic)
plotLCD_gg(result_bic)
plotLRD_gg(result_bic)
plotCMP_gg(result_bic)
plotRMP_gg(result_bic)
plotCRV_gg(result_bic)
plotRRV_gg(result_bic)
plotArray_gg(result_bic)
Biclustering (nominal / ordinal)
result_nom <- Biclustering(data, ncls = 3, nfld = 4)
plotFRP_gg(result_nom, stat = "mean")
plotFCRP_gg(result_nom, style = "line")
plotScoreField_gg(result_nom)
plotCRV_gg(result_nom, stat = "mean")
plotRRV_gg(result_nom, stat = "mean")
plotArray_gg(result_nom)
plotFCBR_gg(result_ord)
LDB: Locally Dependent Biclustering
result_ldb <- LDB(J35S515, ncls = 6, nfld = 5)
plotFRP_gg(result_ldb)
plotTRP_gg(result_ldb)
plotLRD_gg(result_ldb)
plotRMP_gg(result_ldb)
plotArray_gg(result_ldb)
plotFieldPIRP_gg(result_ldb)
plotGraph_gg(result_ldb)
BINET: Bayesian Network and Test
result_binet <- BINET(J35S515, ncls = 6, nfld = 5)
plotFRP_gg(result_binet)
plotTRP_gg(result_binet)
plotLRD_gg(result_binet)
plotRMP_gg(result_binet)
plotArray_gg(result_binet)
plotGraph_gg(result_binet, show_edge_label = TRUE)
BNM / LDLRA: DAG Visualization (plotGraph_gg)
result_bnm <- BNM(J15S500)
plotGraph_gg(result_bnm)
result_ldlra <- LDLRA(J15S500, ncls = 5)
plotGraph_gg(result_ldlra)
Function-Model Compatibility
IRT / GRM
| Function |
IRT |
GRM |
| plotICC_gg |
x |
|
| plotICC_overlay_gg |
x |
|
| plotIIC_gg |
x |
x |
| plotIIC_overlay_gg |
x |
x |
| plotTIC_gg |
x |
x |
| plotTRF_gg |
x |
|
| plotICRF_gg |
|
x |
LCA / LRA / LRAordinal / LRArated
| Function |
LCA |
LRA |
LRAordinal |
LRArated |
| plotIRP_gg |
x |
x |
|
|
| plotFRP_gg |
x |
x |
|
|
| plotTRP_gg |
x |
x |
|
|
| plotLCD_gg |
x |
|
|
|
| plotLRD_gg |
|
x |
|
|
| plotCMP_gg |
x |
|
|
|
| plotRMP_gg |
|
x |
x |
x |
| plotScoreFreq_gg |
|
|
x |
x |
| plotScoreRank_gg |
|
|
x |
x |
| plotICRP_gg |
|
|
x |
x |
| plotICBR_gg |
|
|
x |
|
Biclustering / IRM
| Function |
Bic. |
nomBic. |
ordBic. |
IRM |
| plotFRP_gg |
x |
x |
x |
x |
| plotTRP_gg |
x |
|
|
x |
| plotLCD_gg |
x |
x |
x |
|
| plotLRD_gg |
x |
x |
x |
|
| plotCMP_gg |
x |
x |
x |
|
| plotRMP_gg |
x |
|
x |
|
| plotCRV_gg |
x |
x |
x |
|
| plotRRV_gg |
x |
x |
x |
|
| plotArray_gg |
x |
x |
x |
x |
| plotFCRP_gg |
|
x |
x |
|
| plotFCBR_gg |
|
|
x |
|
| plotScoreField_gg |
|
x |
x |
|
Network Models (LDLRA / LDB / BINET / BNM)
| Function |
LDLRA |
LDB |
BINET |
BNM |
| plotIRP_gg |
x |
|
|
|
| plotFRP_gg |
|
x |
x |
|
| plotTRP_gg |
|
x |
x |
|
| plotLRD_gg |
x |
x |
x |
|
| plotRMP_gg |
x |
x |
x |
|
| plotArray_gg |
|
x |
x |
|
| plotFieldPIRP_gg |
|
x |
|
|
| plotGraph_gg |
x |
x |
x |
x |
Utility
| Function |
Description |
| combinePlots_gg |
Arrange multiple plots in a grid |
Common Plot Options
All plot functions support these customization options:
| Parameter |
Description |
Default |
title |
TRUE (auto), FALSE (none), or character string |
TRUE |
colors |
Color vector (colorblind-friendly default) |
auto |
linetype |
"solid", "dashed", "dotted", etc. |
"solid" |
show_legend |
Show/hide legend |
TRUE |
legend_position |
"right", "top", "bottom", "left"
|
"right" |
Some functions have additional parameters:
| Parameter |
Functions |
Description |
stat |
plotFRP_gg, plotCRV_gg, plotRRV_gg |
"mean", "median", or "mode" for polytomous data |
style |
plotFCRP_gg |
"line" or "bar"
|
show_labels |
plotRRV_gg |
Show value labels (uses ggrepel) |
Documentation