wizirt.Rd
Estimate an IRT model using various engines
wizirt( data, rownames = NULL, item_type = "Rasch", engine = "mirt", tol = 1e-05, abs_fit = T )
data | An Person x Items matrix or dataframe of dichotomous response values (e.g. correct/incorrect). Rows are persons and columns are items, one row per person, one column per item. No other information allowed. |
---|---|
rownames | Optional unique row IDs for the data (i.e. examinee IDs). If omitted, uses 1:nrow(data). |
item_type | Character. Must be one of "Rasch", "1PL", "2PL" or "3PL". |
engine | Character. Currently supported engines are "mirt" and "ltm" for Rasch, 1PL, 2PL, and 3PL models. "eRm" is supported for Rasch models only. |
tol | Numeric. Convergence criterion. Currently only implemented when engine is mirt. |
abs_fit | Logical. Should absolute fit statistics be calculated? Increases time for estimation. Currently supported engine is "mirt". |
Returns a list of class wizirt. spec is a list of information for the parsnip backend. Printing spec prints a summary of the model run. elapsed contains the time it took the model to run. fit contains the model information:
data is the data passed to the model
model contains model fit information, including:
engine a list with values pkg (the package used for estimation), ver (pkg version), func (functiong used from pkg), and call (call made to pkg)
n_factors the number of factors estimated
item_type the item type passed to wizirt (Rasch, 1PL, 2PL, or 3PL).
estimation a list with information related to convergence. convergence a T/F value of whether the model converged, method the estimation method, criteria the convergence criteria, iterations the number of iterations it took for the model to converge, log_lik the loglikelihood at convergence, abs_fit the absolute fit of the model, df the number of parameters estimated.
parameters a list of estimated parameters. coefficients is a data frame of estimated item-statistics and persons is a data frame of estimated person statistics.
original_object is the object returned from the engine.
data("responses") my_model <- wizirt(data = responses[, -1], item_type = "2PL", tol = 1e-4, engine = "mirt") print(my_model, type = "tech")#> # A tibble: 11 x 2 #> parameter value #> <chr> <chr> #> 1 package "mirt" #> 2 function "mirt" #> 3 version "1.32.7" #> 4 call "mirt::mirt(data = data, model = 1, itemtype = \"2PL\", SE = ~ #> 5 factors "1" #> 6 item type "2PL" #> 7 converged "TRUE" #> 8 method "EM" #> 9 log-likelihood "-1009.37643471027" #> 10 criteria "1e-05" #> 11 iterations "76"#> # A tibble: 7 x 2 #> parameter value #> <chr> <dbl> #> 1 N Items 25 #> 2 Avg Difficulty -0.06 #> 3 Avg Diff (CTT) 0.75 #> 4 N Persons 75 #> 5 Avg Ability 0 #> 6 Avg % Correct 75 #> 7 Avg % Completion 100#> # A tibble: 25 x 4 #> item difficulty discrimination guessing #> <chr> <dbl> <dbl> <dbl> #> 1 A -0.606 1.75 0 #> 2 B -1.87 0.580 0 #> 3 C -2.26 0.624 0 #> 4 D -2.32 0.363 0 #> 5 E 10.5 -0.0904 0 #> 6 F -5.38 0.177 0 #> 7 G -1.71 0.952 0 #> 8 H -0.996 1.22 0 #> 9 I -2.63 0.459 0 #> 10 J -2.70 0.416 0 #> # ... with 15 more rows#> # A tibble: 75 x 3 #> ability std_err ids #> <dbl> <dbl> <int> #> 1 -0.0216 0.533 1 #> 2 0.662 0.640 2 #> 3 -0.201 0.510 3 #> 4 -1.93 0.556 4 #> 5 -0.735 0.472 5 #> 6 -0.503 0.482 6 #> 7 0.874 0.674 7 #> 8 -0.746 0.472 8 #> 9 -0.172 0.514 9 #> 10 -1.05 0.476 10 #> # ... with 65 more rows#> # A tibble: 25 x 3 #> item count prop #> <chr> <dbl> <dbl> #> 1 A 0 0 #> 2 B 0 0 #> 3 C 0 0 #> 4 D 0 0 #> 5 E 0 0 #> 6 F 0 0 #> 7 G 0 0 #> 8 H 0 0 #> 9 I 0 0 #> 10 J 0 0 #> # ... with 15 more rowsanova(my_model)#> # A tibble: 8 x 2 #> stat values #> <chr> <dbl> #> 1 log_lik -1009. #> 2 N 75 #> 3 n_pars 50 #> 4 AIC 2119. #> 5 AICc 2331. #> 6 BIC 2235. #> 7 SABIC 2077. #> 8 HQ 2165.