R/extensions.R, R/plot_functions.R
plot-methods.RdExtension of plot() for objects in TestDesign package
# S4 method for class 'item_pool'
plot(
x,
y,
type = "info",
theta = seq(-3, 3, 0.1),
info_type = "FISHER",
plot_sum = TRUE,
select = NULL,
examinee_id = 1,
position = NULL,
theta_range = c(-5, 5),
ylim = NULL,
color = "blue",
z_ci = 1.96,
simple = TRUE,
theta_type = "Estimated",
color_final = "blue",
color_stim = "red",
segment = NULL,
rmse = FALSE,
use_segment_label = TRUE,
use_par = TRUE,
...
)
# S4 method for class 'output_Static'
plot(
x,
y,
type = NULL,
theta = seq(-3, 3, 0.1),
info_type = "FISHER",
plot_sum = TRUE,
select = NULL,
examinee_id = 1,
position = NULL,
theta_range = c(-5, 5),
ylim = NULL,
color = "blue",
z_ci = 1.96,
simple = TRUE,
use_par = TRUE,
...
)
# S4 method for class 'constraints'
plot(
x,
y,
type = "info",
theta = seq(-3, 3, 0.1),
info_type = "FISHER",
plot_sum = TRUE,
select = NULL,
examinee_id = 1,
position = NULL,
theta_range = c(-5, 5),
ylim = NULL,
color = "blue",
z_ci = 1.96,
simple = TRUE,
use_par = TRUE,
...
)
# S4 method for class 'output_Shadow'
plot(
x,
y,
type = "audit",
theta = seq(-3, 3, 0.1),
info_type = "FISHER",
plot_sum = TRUE,
select = NULL,
examinee_id = 1,
theta_range = c(-5, 5),
ylim = NULL,
color = "blue",
z_ci = 1.96,
simple = FALSE,
theta_type = "Estimated",
use_par = TRUE,
...
)
# S4 method for class 'output_Shadow_all'
plot(
x,
y,
type = "audit",
theta = seq(-3, 3, 0.1),
info_type = "FISHER",
plot_sum = TRUE,
select = NULL,
examinee_id = 1,
position = NULL,
theta_range = c(-5, 5),
ylim = NULL,
color = "blue",
z_ci = 1.96,
simple = FALSE,
theta_type = "Estimated",
color_final = "blue",
color_stim = "red",
segment = NULL,
rmse = FALSE,
use_segment_label = TRUE,
use_par = TRUE,
...
)
# S4 method for class 'output_Split'
plot(
x,
y,
type = NULL,
theta = seq(-3, 3, 0.1),
info_type = "FISHER",
plot_sum = TRUE,
select = NULL,
examinee_id = 1,
position = NULL,
theta_range = c(-5, 5),
ylim = NULL,
color = "blue",
z_ci = 1.96,
simple = TRUE,
use_par = TRUE,
...
)accepts the following signatures:
item_pool: plot information and expected scores.
constraints: plot information range based on the test length constraint.
output_Static: plot information and expected scores based on the fixed assembly solution.
output_Shadow_all: plot audit trail, shadowtest chart, exposure rates, and item overlap data from the adaptive assembly solution.
output_Shadow: plot audit trail and shadowtest chart from the adaptive assembly solution.
not used, exists for compatibility with plot in the base R package.
the type of plot.
info plots information from item_pool, output_Static, and output_Shadow_all.
score plots expected scores from item_pool and output_Static.
audit plots audit trail from output_Shadow_all and output_Shadow.
shadow plots shadowtest chart from output_Shadow_all and output_Shadow.
exposure plots exposure rates from output_Shadow_all.
overlap plots item overlap data from output_Shadow_all.
the theta grid to use in plotting. (default = seq(-3, 3, .1))
the type of information. Currently accepts FISHER. (default = FISHER)
used in item_pool objects.
if TRUE then plot pool-level values.
if FALSE then plot item-level values, and repeat for all items in the pool.
(default = TRUE)
used in item_pool objects. Item indices to subset.
used in output_Shadow and output_Shadow_all with type = 'audit' and type = 'shadow'. The examinee numeric ID to draw the plot.
used in output_Shadow_all with type = 'info'. The item position to draw the plot.
used in output_Shadow and output_Shadow_all with type = 'audit'. The theta range to plot. (default = c(-5, 5))
(optional) the y-axis plot range. Used in most plot types.
the color of the curve.
used in output_Shadow and output_Shadow_all with type = 'audit'. The range to use for confidence intervals. (default = 1.96)
used in output_Shadow and output_Shadow_all with type = 'shadow'. If TRUE, simplify the chart by hiding unused items.
used in output_Shadow_all with type = 'exposure'. The type of theta to determine exposure segments. Accepts Estimated or True. (default = Estimated)
used in output_Shadow_all with type = 'exposure'. The color of item-wise exposure rates, only counting the items administered in the final theta segment as exposed.
used in output_Shadow_all with type = 'exposure' or type = 'overlap'. The color of stimulus exposure rates or stimulus overlap data.
used in output_Shadow_all with type = 'exposure'. (optional) The segment index to draw the plot. Leave empty to use all segments.
used in output_Shadow_all with type = 'exposure'. If TRUE, display the RMSE value for each segment. (default = FALSE)
used in output_Shadow_all with type = 'exposure'. If TRUE, display the segment label for each segment. (default = TRUE)
if FALSE, graphical parameters are not overridden inside the function. (default = TRUE)
arguments to pass onto plot.
subitempool <- itempool_science[1:8]
## Plot item information of a pool
plot(subitempool)
plot(itempool_science, select = 1:8)
## Plot expected score of a pool
plot(subitempool, type = "score")
plot(itempool_science, type = "score", select = 1:8)
## Plot assembly results from Static()
cfg <- createStaticTestConfig()
solution <- Static(cfg, constraints_science)
plot(solution) # defaults to the objective type
plot(solution, type = "score") # plot expected scores
## Plot attainable information range from constraints
plot(constraints_science)
## Plot assembly results from Shadow()
cfg <- createShadowTestConfig()
set.seed(1)
solution <- Shadow(cfg, constraints_science, true_theta = rnorm(1))
plot(solution, type = 'audit' , examinee_id = 1)
plot(solution, type = 'shadow', examinee_id = 1, simple = TRUE)
## plot(solution, type = 'exposure')
## plot(solution, type = 'overlap')