| plotFRP_gg | R Documentation |
This function takes exametrika output as input and generates a Field Reference Profile (FRP) plot using ggplot2. For binary data, it displays correct response rates. For polytomous data, it shows expected scores calculated using the specified statistic.
plotFRP_gg(
data,
stat = "mean",
fields = NULL,
title = TRUE,
colors = NULL,
linetype = "solid",
show_legend = TRUE,
legend_position = "right"
)
data |
An object from exametrika: Biclustering, nominalBiclustering, ordinalBiclustering, ratedBiclustering, IRM, LDB, or BINET output. |
stat |
Character. Statistic to use for polytomous data:
|
fields |
Integer vector specifying which fields to plot. Default is all fields. |
title |
Logical or character. If |
colors |
Character vector. Colors for each field line.
If |
linetype |
Character or numeric. Line type for all lines.
Default is |
show_legend |
Logical. If |
legend_position |
Character. Position of the legend:
|
The Field Reference Profile shows how response patterns vary across latent classes/ranks for each field (cluster of items).
For binary data (Biclustering, IRM, LDB, BINET):
Y-axis: Correct Response Rate (0-1)
Each line represents one field
For polytomous data (nominalBiclustering, ordinalBiclustering, ratedBiclustering):
Y-axis: Expected Score (calculated using stat parameter)
stat = "mean": Weighted average across categories (default)
stat = "median": Median category value
stat = "mode": Most probable category
A single ggplot object with all selected fields.
plotIRP_gg, plotTRP_gg,
plotCRV_gg, plotRRV_gg
library(exametrika)
# Binary biclustering
result_bin <- Biclustering(J35S515, ncls = 4, nfld = 3)
plot <- plotFRP_gg(result_bin)
# Ordinal biclustering with mean (default)
result_ord <- Biclustering(J35S500, ncls = 4, nfld = 3)
plot_mean <- plotFRP_gg(result_ord, stat = "mean")
# Using mode for polytomous data
plot_mode <- plotFRP_gg(result_ord,
stat = "mode",
title = "Field Reference Profile (Mode)",
colors = c("red", "blue", "green")
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.