| compute_Modified_probabilities | R Documentation |
Compute Modified Item Response Probabilities
compute_Modified_probabilities(results, theta_all)
results |
The data frame returned by fit_binary_irt. |
theta_all |
A numeric vector representing ability levels (total scores). |
A numeric matrix of predicted probabilities with dimensions
length(theta_all) rows by nrow(results) columns.
Each cell contains the probability of a correct response for a given
ability level and item, calculated using the logistic function:
exp(\theta - \beta) / (1 + exp(\theta - \beta)), where \beta
is the item threshold. Columns are named after the items.
set.seed(123)
sample_data <- matrix(sample(c(0, 1), 100, replace = TRUE), ncol = 10)
prepared <- prepare_data(sample_data)
irt_results <- fit_binary_irt(prepared$matrix, prepared$total_score)
abilities <- seq(0, 10, length.out = 5)
probs <- compute_Modified_probabilities(irt_results, abilities)
print(head(probs))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.