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"),
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.
- group_var
Optional design variable used for separate lines.
- draw
If
TRUE, draw with base graphics; otherwise return plotting data.- ...
Reserved for generic compatibility.
Value
If draw = TRUE, invisibly returns a plotting-data list. If
draw = FALSE, returns that list directly.
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"
Examples
sim_eval <- evaluate_mfrm_design(
n_person = c(30, 50),
n_rater = 4,
n_criterion = 4,
raters_per_person = 2,
reps = 1,
maxit = 15,
seed = 123
)
#> Warning: Optimizer did not fully converge (code = 1). Consider increasing maxit (current: 15) or relaxing reltol (current: 1e-06).
#> Warning: Optimizer did not fully converge (code = 1). Consider increasing maxit (current: 15) or relaxing reltol (current: 1e-06).
plot(sim_eval, facet = "Rater", metric = "separation", x_var = "n_person", draw = FALSE)
#> $plot
#> [1] "design_evaluation"
#>
#> $facet
#> [1] "Rater"
#>
#> $metric
#> [1] "separation"
#>
#> $metric_col
#> [1] "MeanSeparation"
#>
#> $x_var
#> [1] "n_person"
#>
#> $group_var
#> NULL
#>
#> $data
#> # A tibble: 2 × 3
#> n_person y group
#> <int> <dbl> <chr>
#> 1 30 2.99 All designs
#> 2 50 2.51 All designs
#>