Visualize the design-weighted precision curve and optionally
per-facet-level contribution curves from compute_information().
Usage
plot_information(
x,
type = c("tif", "iif", "se", "both"),
facet = NULL,
draw = TRUE,
...
)Arguments
- x
Output from
compute_information().- type
"tif"for the overall precision curve (default),"iif"for facet-level contribution curves,"se"for the approximate standard error implied by that curve, or"both"for precision with approximate SE on a secondary axis.- facet
For
type = "iif", which facet to plot. IfNULL, the first facet is used.- draw
If
TRUE(default), draw the plot. IfFALSE, return the plot data invisibly.- ...
Additional graphical parameters.
Plot types
"tif": overall design-weighted precision across theta."se": approximate standard error across theta."both": precision and approximate SE together, useful for presentations."iif": facet-level contribution curves for one selected facet in an RSM fit.
Which type should I use?
Use
"tif"for a quick overall read on precision.Use
"se"when standard-error language is easier to communicate than precision.Use
"both"when you want both views in one figure.Use
"iif"when you want to see which facet levels are shaping the total precision curve.
Interpreting output
The total curve peaks where the realized design is most precise.
SE is derived as
1 / sqrt(precision); lower is better.Facet-level curves show which facet levels contribute most to that realized precision at each theta.
If the precision peak sits far from the bulk of person measures, the realized design may be poorly targeted.
Returned data when draw = FALSE
For type = "tif", "se", or "both", the returned data come from
x$tif. For type = "iif", the returned data are the rows of x$iif
filtered to the requested facet.
Typical workflow
Compute information with
compute_information().Plot with
plot_information(info)for the total precision curve.Use
plot_information(info, type = "iif", facet = "Rater")for facet-level contributions.Use
draw = FALSEwhen you want the plotting data for custom graphics.
Examples
toy <- load_mfrmr_data("example_core")
fit <- fit_mfrm(toy, "Person", c("Rater", "Criterion"), "Score",
method = "JML", model = "RSM", maxit = 25)
info <- compute_information(fit)
tif_data <- plot_information(info, type = "tif", draw = FALSE)
head(tif_data)
#> # A tibble: 6 × 3
#> Theta Information SE
#> <dbl> <dbl> <dbl>
#> 1 -6 7.60 0.363
#> 2 -5.94 8.07 0.352
#> 3 -5.88 8.56 0.342
#> 4 -5.82 9.09 0.332
#> 5 -5.76 9.64 0.322
#> 6 -5.7 10.2 0.313
iif_data <- plot_information(info, type = "iif", facet = "Rater", draw = FALSE)
head(iif_data)
#> # A tibble: 6 × 5
#> Theta Facet Level Information Exposure
#> <dbl> <chr> <chr> <dbl> <dbl>
#> 1 -6 Rater R01 2.23 192
#> 2 -5.94 Rater R01 2.36 192
#> 3 -5.88 Rater R01 2.51 192
#> 4 -5.82 Rater R01 2.66 192
#> 5 -5.76 Rater R01 2.82 192
#> 6 -5.7 Rater R01 3.00 192