Plot a design-simulation study
Usage
# S3 method for class 'mfrm_design_evaluation'
plot(
x,
facet = c("Rater", "Criterion", "Person"),
metric = c("separation", "reliability", "infit", "outfit", "misfitrate",
"severityrmse", "severitybias", "convergencerate", "elapsedsec", "mincategorycount",
"designdensity", "plannedmissingrate", "linkpersons", "linkfraction", "linkraters",
"mincommonpersons", "zerocommonpairs", "pairsshorttarget"),
x_var = c("n_person", "n_rater", "n_criterion", "raters_per_person"),
group_var = NULL,
draw = TRUE,
...
)Arguments
- x
Output from
evaluate_mfrm_design().- facet
Facet to visualize.
- metric
Metric to plot.
- x_var
Design variable used on the x-axis. When
xwas generated from asim_specwith custom public facet names, the corresponding aliases (for examplen_judge,n_task,judge_per_person) are also accepted. Role keywords (person,rater,criterion,assignment) are accepted as an abstraction over the current two-facet schema.- group_var
Optional design variable used for separate lines. The same alias rules as
x_varapply.- draw
If
TRUE, draw with base graphics; otherwise return plotting data.- ...
Reserved for generic compatibility.
Value
Invisibly, a ggplot object whose reusable payload (accessible via
plot_data()) includes resolved canonical variables (x_var, group_var)
together with public labels (x_label, group_label),
design_variable_aliases, and design_descriptor, plus planning_scope,
planning_constraints, and planning_schema.
Details
This method is designed for quick design-planning scans rather than polished publication graphics.
Useful first plots are:
rater
metric = "separation"againstx_var = "n_person"criterion
metric = "severityrmse"againstx_var = "n_person"when you want aligned recovery error rather than raw location shiftsrater
metric = "convergencerate"againstx_var = "raters_per_person"sparse linked
metric = "plannedmissingrate","mincommonpersons","zerocommonpairs", or"pairsshorttarget"to review planned missingness and rater-pair linkage separately from recovery metrics
Examples
# Supplementary workflow: run explicitly to keep routine checks brief.
# example("plot.mfrm_design_evaluation", run.dontrun = TRUE)
if (FALSE) { # \dontrun{
# One saved replication illustrates output structure, not precise rates.
# Regeneration recipe: examples/simulation-results.R in the package.
saved <- readRDS(system.file("examples", "simulation-design.rds",
package = "mfrmr", mustWork = TRUE))
# Inspect saved$generation_warnings and the result's run/status tables.
sim_eval <- saved$result
p <- plot(sim_eval, facet = "Rater", metric = "separation", x_var = "n_person", draw = FALSE)
pd <- plot_data(p)
c(pd$facet, pd$x_var)
} # }
