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
)

# S4 method for 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
)

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.

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           : -1.400044 
#>   Final theta estimate : -1.338556 
#>   Final SE estimate    : 0.2672964 
#>    stage stimulus_index item_index item_resp item_ncat interim_theta interim_se
#> 1      1             NA        567         0         3    -0.5924506  0.7490406
#> 2      2             NA        795         0         3    -1.3194239  0.6560083
#> 3      3             NA        847         0         3    -1.8032921  0.5822011
#> 4      4             NA         89         2         3    -1.2185459  0.4648906
#> 5      5             NA        940         1         3    -1.2142178  0.4259300
#> 6      6             NA        587         2         3    -0.9486594  0.4007839
#> 7      7             NA        900         0         3    -1.0774608  0.3851033
#> 8      8             NA         42         0         2    -1.1279861  0.3748951
#> 9      9             NA         92         0         2    -1.1661351  0.3687200
#> 10    10             NA          4         1         2    -1.1268611  0.3631582
#> 11    11             NA         56         1         3    -1.1036555  0.3351523
#> 12    12             NA        290         0         4    -1.1764425  0.3257606
#> 13    13             NA        428         0         2    -1.2592226  0.3196785
#> 14    14             NA        538         0         2    -1.3201765  0.3152927
#> 15    15             NA        615         0         2    -1.3911677  0.3114897
#> 16    16             NA         11         0         3    -1.4636527  0.3096513
#> 17    17             NA        600         0         2    -1.5237047  0.3069239
#> 18    18             NA        420         1         2    -1.4950430  0.3004250
#> 19    19             NA        421         0         2    -1.5201125  0.2993451
#> 20    20             NA          3         1         2    -1.4840899  0.2982755
#> 21    21             NA        263         0         3    -1.5372597  0.2926565
#> 22    22             NA        865         1         3    -1.4705398  0.2852602
#> 23    23             NA        946         1         3    -1.3813534  0.2772106
#> 24    24             NA        549         0         2    -1.4153764  0.2764295
#> 25    25             NA        680         0         3    -1.4307520  0.2748275
#> 26    26             NA        629         1         2    -1.4002018  0.2724934
#> 27    27             NA         36         0         2    -1.4212331  0.2718303
#> 28    28             NA        679         1         2    -1.3924608  0.2695204
#> 29    29             NA        352         1         2    -1.3594577  0.2681620
#> 30    30             NA        194         1         2    -1.3385562  0.2672964
#>    theta_segment
#> 1              4
#> 2              3
#> 3              3
#> 4              2
#> 5              3
#> 6              3
#> 7              3
#> 8              3
#> 9              3
#> 10             3
#> 11             3
#> 12             3
#> 13             3
#> 14             3
#> 15             3
#> 16             3
#> 17             3
#> 18             2
#> 19             3
#> 20             2
#> 21             3
#> 22             2
#> 23             3
#> 24             3
#> 25             3
#> 26             3
#> 27             3
#> 28             3
#> 29             3
#> 30             3
#> 
#>