Shadow is a test assembly function for performing adaptive test assembly based on the generalized shadow-test framework.

Shadow(
  config,
  constraints = NULL,
  true_theta = NULL,
  data = NULL,
  prior = NULL,
  prior_par = NULL,
  exclude = NULL,
  include_items_for_estimation = NULL,
  force_solver = FALSE,
  session = NULL,
  seed = NULL,
  cumulative_usage_matrix = NULL
)

# S4 method for class 'config_Shadow'
Shadow(
  config,
  constraints = NULL,
  true_theta = NULL,
  data = NULL,
  prior = NULL,
  prior_par = NULL,
  exclude = NULL,
  include_items_for_estimation = NULL,
  force_solver = FALSE,
  session = NULL,
  seed = NULL,
  cumulative_usage_matrix = NULL
)

Arguments

config

a config_Shadow object. Use createShadowTestConfig for this.

constraints

a constraints object representing test specifications. Use loadConstraints for this.

true_theta

(optional) true theta values to use in simulation. Either true_theta or data must be supplied.

data

(optional) a matrix containing item response data to use in simulation. Either true_theta or data must be supplied.

prior

(optional) density at each config@theta_grid to use as prior. Must be a length-nq vector or a nj * nq matrix. This overrides prior_dist and prior_par in the config. prior and prior_par cannot be used simultaneously.

prior_par

(optional) normal distribution parameters c(mean, sd) to use as prior. Must be a length-nq vector or a nj * nq matrix. This overrides prior_dist and prior_par in the config. prior and prior_par cannot be used simultaneously.

exclude

(optional) a list containing item names in $i and set names in $s to exclude from selection for each participant. The length of the list must be equal to the number of participants.

include_items_for_estimation

(optional) an examinee-wise list containing:

  • administered_item_pool items to include in theta estimation as item_pool object.

  • administered_item_resp item responses to include in theta estimation.

force_solver

if TRUE, do not check whether the solver is one of recommended solvers for complex problems (set-based assembly, partitioning). (default = FALSE)

session

(optional) used to communicate with Shiny app TestDesign.

seed

(optional) used to perform data generation internally.

cumulative_usage_matrix

(optional) a *nj* by (*ni* + *ns*) matrix containing the number of times the item/stimulus was administered previously to each participant. Stimuli representations are appended to the right side of the matrix.

Value

Shadow returns an output_Shadow_all object containing assembly results.

References

van der Linden, W. J., Reese, L. M. (1998). A model for optimal constrained adaptive testing. Applied Psychological Measurement, 22, 259-270.

van der Linden, W. J. (1998). Optimal assembly of psychological and educational tests. Applied Psychological Measurement, 22, 195-211.

van der Linden, W. J. (2000). Optimal assembly of tests with item sets. Applied Psychological Measurement, 24, 225-240.

van der Linden, W. J. (2005). Linear models for optimal test design. Springer Science & Business Media.

Examples

config <- createShadowTestConfig()
true_theta <- rnorm(1)
solution <- Shadow(config, constraints_science, true_theta)
#> Loading required namespace: progress
solution@output
#> [[1]]
#> Simulee index          : 1 
#>   True theta           : 0.2553171 
#>   Final theta estimate : -0.01452494 
#>   Final SE estimate    : 0.2214864 
#>    stage stimulus_index item_index item_resp item_ncat interim_theta interim_se
#> 1      1             NA        567         2         3  0.8408900050  0.7021182
#> 2      2             NA        914         2         3  1.1452400899  0.6476122
#> 3      3             NA        692         0         2  0.8320395678  0.5280006
#> 4      4             NA        688         0         2  0.5638379295  0.4659747
#> 5      5             NA         42         0         2  0.3358363363  0.4333993
#> 6      6             NA        795         2         3  0.4203247484  0.4097267
#> 7      7             NA        294         0         3  0.1843822707  0.3818226
#> 8      8             NA        587         0         3 -0.0303490372  0.3635148
#> 9      9             NA         92         1         2  0.0417991774  0.3547410
#> 10    10             NA          4         1         2  0.0561514909  0.3522803
#> 11    11             NA        435         2         3  0.1516144671  0.3294754
#> 12    12             NA        290         1         4  0.0739620374  0.3079854
#> 13    13             NA        291         2         3  0.1292909909  0.3000387
#> 14    14             NA        664         0         2  0.0368010907  0.2903680
#> 15    15             NA        120         0         2 -0.0135372682  0.2832403
#> 16    16             NA        428         1         2  0.0008858842  0.2806906
#> 17    17             NA          3         1         2  0.0237986032  0.2791061
#> 18    18             NA        421         0         2 -0.0222285282  0.2762465
#> 19    19             NA        935         1         2 -0.0069517655  0.2746213
#> 20    20             NA        517         1         2  0.0048120961  0.2732242
#> 21    21             NA        382         2         3  0.0817837476  0.2648621
#> 22    22             NA        946         0         3  0.0038400514  0.2545641
#> 23    23             NA        563         1         3  0.0513429569  0.2480913
#> 24    24             NA        263         1         3  0.0354961697  0.2411458
#> 25    25             NA        791         1         3  0.0873338249  0.2361395
#> 26    26             NA        680         1         3  0.1002898940  0.2314077
#> 27    27             NA        925         0         3  0.0664745642  0.2265977
#> 28    28             NA        362         0         3  0.0350019502  0.2234466
#> 29    29             NA        352         0         2  0.0104728240  0.2221938
#> 30    30             NA        679         0         2 -0.0145249360  0.2214864
#>    theta_segment
#> 1              4
#> 2              5
#> 3              5
#> 4              5
#> 5              5
#> 6              4
#> 7              4
#> 8              4
#> 9              4
#> 10             4
#> 11             4
#> 12             4
#> 13             4
#> 14             4
#> 15             4
#> 16             4
#> 17             4
#> 18             4
#> 19             4
#> 20             4
#> 21             4
#> 22             4
#> 23             4
#> 24             4
#> 25             4
#> 26             4
#> 27             4
#> 28             4
#> 29             4
#> 30             4
#> 
#>