Description Usage Arguments Value Examples
Simulate several iterations of getting the key of the new item to administer and the updated theta estimate, and getting an answer to the new item.
1 2 3 4 5 6 | test_shadowcat(true_theta, prior_form, prior_parameters, model, alpha, beta,
start_items, stop_test, estimator, information_summary, guessing = NULL,
eta = NULL, constraints_and_characts = NULL, lower_bound = NULL,
upper_bound = NULL, safe_eap = FALSE, initital_estimate = rep(0,
ncol(alpha)), initial_variance = diag(ncol(alpha)) * 25,
eap_estimation_procedure = "riemannsum")
|
true_theta |
True theta value or vector. |
prior_form |
String indicating the form of the prior; one of |
prior_parameters |
List containing mu and Sigma of the normal prior: |
model |
One of |
alpha |
Matrix of alpha parameters, one column per dimension, one row per item. Row names should contain the item keys. Note that so called within-dimensional models still use an alpha matrix, they simply have only one non-zero loading per item. |
beta |
Matrix of beta parameters, one column per item step, one row per item. Row names should contain the item keys.
Note that |
start_items |
List indicating the items that should be shown to the respondent before the theta estimate will be updated
for the first time. One of
|
stop_test |
List indicating rules for when to terminate the test. Should be a list of the form
|
estimator |
Type of estimator to be used, one of |
information_summary |
How to summarize Fisher information, used for item selection. One of
|
guessing |
Matrix with one column of guessing parameters per item. Row names should contain the item keys. Optionally used in 3PLM model, ignored for all others. |
eta |
Matrix of location parameters, optionally used in GPCM model, ignored for all others. Row names should contain the item keys. If eta is defined, the beta matrix will be derived from this eta matrix by computing the cumulative sums of the rows of eta; see Glas and Dagohoy (2006). |
constraints_and_characts |
List with constraints and characteristics for Shadow Testing; |
lower_bound |
Vector with lower bounds for theta per dimension. Estimated theta values smaller than the lower bound values are truncated to the lower bound values. Can only be defined when estimator is maximum likelihood. Setting bounds with maximum likelihood estimation is equivalent to using maximum aposteriori estimation with a uniform prior. |
upper_bound |
Vector with upper bounds for theta per dimension. Estimated theta values larger than the upper bound values are truncated to the upper bound values. Can only be defined when estimator is maximum likelihood. Setting bounds with maximum likelihood estimation is equivalent to using maximum aposteriori estimation with a uniform prior. |
safe_eap |
Only relevant if estimator is expected aposteriori.
Set to |
initital_estimate |
Vector containing the initial theta estimate, before any items have been administered. |
initial_variance |
Matrix containing the initial covariance matrix, before any items have been administered. |
eap_estimation_procedure |
String indicating the estimation procedure if estimator is expected aposteriori and prior form is normal. One of |
List as returned by shadowcat
after test is terminated, with variance
element turned into matrix.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | # One dimension
alpha_beta_one_dim <- simulate_testbank(model = "GPCM", number_items = 50,
number_dimensions = 1, number_itemsteps = 3)
test_shadowcat(true_theta = 2, prior_form = "normal",
prior_parameters = list(mu = 0, Sigma = diag(1)), model = "SM",
alpha = alpha_beta_one_dim$alpha, beta = alpha_beta_one_dim$beta,
start_items = list(type = 'random', n = 3),
stop_test = list(max_n = 20, target = 0.1), estimator = "maximum_aposteriori",
information_summary = "posterior_determinant")
# Three dimensions
alpha_beta_three_dim <- simulate_testbank(model = "GPCM", number_items = 100,
number_dimensions = 3, number_itemsteps = 3)
test_shadowcat(true_theta = c(0, 1, -.5), prior_form = "normal",
prior_parameters = list(mu = c(0, 0, 0), Sigma = diag(3)),
model = "SM", alpha = alpha_beta_three_dim$alpha,
beta = alpha_beta_three_dim$beta, start_items = list(type = 'random', n = 3),
stop_test = list(max_n = 60, target = c(.1, .1, .1)),
estimator = "maximum_aposteriori", information_summary = "posterior_determinant")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.