| fit_binary_irt | R Documentation |
Fit Binary IRT Model using GLM
fit_binary_irt(data_mat, total_score)
data_mat |
A numeric matrix of responses (persons in rows, items in columns). |
total_score |
A numeric vector of total scores for each person. |
A data frame with one row per item and the following columns:
Item: The name of the item.
Intercept: The estimated intercept parameter from the GLM logit model.
Slope: The estimated slope parameter (discrimination) from the GLM logit model.
threshold: The calculated item difficulty (also known as the beta parameter),
computed as -Intercept / Slope. This represents the point on the ability scale where
the probability of a correct response is 0.5.
set.seed(42)
sample_data <- matrix(sample(c(0, 1), 50, replace = TRUE), ncol = 5)
colnames(sample_data) <- paste0("Item", 1:5)
prepared <- prepare_data(sample_data)
irt_results <- fit_binary_irt(prepared$matrix, prepared$total_score)
print(irt_results)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.