Description Usage Arguments Value Examples
View source: R/itemResponseTheory.R
Calculate the probability of the given item/score combinations for a range of thetas
1 | scoreProbability.scores(item_pars, thetas, scores)
|
item_pars |
a matrix of doubles, items by params. Must have columns for $PAR_* matching the $MODEL |
thetas |
a vector of doubles. Various ability levels |
scores |
a vector of integers. A score for each item. Must be same length as nrow(items). |
a matrix of doubles, items by thetas, containing the probability of the given item/score combinations for a range of thetas
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | simulation = readRDS(system.file("example/passage-optimal.rds", package = "CATSimulator"))
item_pars = as.matrix(simulation$itempool[,startsWith(colnames(simulation$itempool), "PAR_")])
dimnames(item_pars) = list(simulation$itempool$ITEM_ID, colnames(simulation$itempool)[startsWith(colnames(simulation$itempool), "PAR_")])
thetas = seq(-2, 2, by = 0.5)
scores = rep(0, nrow(item_pars)) # sample(0:1, nrow(item_pars), replace = TRUE)
scoreProb = scoreProbability.scores(item_pars, thetas, scores)
options(digits=8, scipen=8)
> scoreProb -2 -1.5 -1 -0.5 0 0.5 1 1.5 2
item001 0.58809834 0.50372283 0.41558368 0.32888841 0.249089805 0.180546552 0.125536324 0.084083112 0.054534047
item002 0.59190964 0.51613679 0.43669503 0.35733888 0.282200703 0.214963841 0.158113716 0.112580468 0.077870790
item003 0.94513409 0.91771404 0.87678454 0.81655990 0.730749143 0.615846666 0.477205951 0.333137033 0.208115753
item004 0.83947786 0.79814254 0.74606866 0.68095351 0.600952839 0.506025087 0.399962837 0.291827215 0.194203063
item005 0.86416067 0.82918801 0.78442626 0.72729225 0.655279966 0.567109542 0.464703815 0.355122538 0.250122827
item006 ...391 total items/rows
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.