| plotRRV_gg | R Documentation |
This function takes exametrika Biclustering output as input and generates a Rank Reference Vector (RRV) plot using ggplot2. RRV shows how each latent rank performs across fields, with one line per rank.
Supports both binary (2-valued) and polytomous (multi-valued) biclustering models.
For polytomous data, the stat parameter controls how expected scores
are calculated from category probabilities.
plotRRV_gg(
data,
title = TRUE,
colors = NULL,
linetype = "solid",
show_legend = TRUE,
legend_position = "right",
stat = "mean",
show_labels = FALSE
)
data |
An object of class |
title |
Logical or character. If |
colors |
Character vector of colors for each rank.
If |
linetype |
Character or numeric scalar specifying the line type
applied to all lines. Default is |
show_legend |
Logical. If |
legend_position |
Character. Position of the legend.
One of |
stat |
Character. Statistic for polytomous data:
|
show_labels |
Logical. If |
The Rank Reference Vector is the transpose of the Field Reference Profile (FRP). While FRP shows one plot per field, RRV displays all ranks in a single plot with fields on the x-axis. Each line represents a latent rank, showing its performance pattern across fields.
Binary Data (2 categories):
Y-axis shows "Correct Response Rate" (0.0 to 1.0)
Values represent the probability of correct response
Polytomous Data (3+ categories):
Y-axis shows "Expected Score" (1 to max category)
Values are calculated using the stat parameter
Higher scores indicate better performance
RRV is used when latent ranks are ordinal (ordered). For unordered
latent classes, use plotCRV_gg instead.
A single ggplot object showing the Rank Reference Vector.
plotCRV_gg, plotFRP_gg, plotScoreField_gg
# Binary biclustering
library(exametrika)
result <- Biclustering(J15S500, nfld = 3, ncls = 5)
plotRRV_gg(result)
# Ordinal biclustering (polytomous)
data(J35S500)
result_ord <- Biclustering(J35S500, ncls = 5, nfld = 5, method = "R")
plotRRV_gg(result_ord) # Default: mean
plotRRV_gg(result_ord, stat = "median")
plotRRV_gg(result_ord, stat = "mode")
# Custom styling
plotRRV_gg(result_ord,
title = "Rank Performance Across Fields",
colors = c("#1b9e77", "#d95f02", "#7570b3", "#e7298a", "#66a61e"),
legend_position = "bottom"
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.