Description Usage Arguments Value Examples
Generate a score for each item, based on the difficulty of the item vs the theta ability level.
1 | generateScores(item_pars, theta)
|
item_pars |
a matrix of doubles, items by params. Must have columns for $PAR_* matching the $MODEL |
theta |
a double. An ability level |
a vector integers. A score for each item based on the given theta ability
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | 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_")])
theta = 2.0
set.seed(1001)
scores = generateScores(item_pars, theta)
options(digits=8, scipen=8)
> scores
item001 item002 item003 item004 item005 item006 item007 item008 item009 item010
0 2 2 3 2 0 6 6 2 0
item011 item012 item013 item014 item015 item016 item017 item018 item019 item020
2 2 1 2 1 0 2 2 2 1
item021 item022 item023 item024 item025 item026 item027 item028 item029 item030
2 3 0 2 2 0 1 2 1 3
item031 item032 item033 item034 item035 item036 item037 item038 item039 item040
2 0 0 1 2 2 4 1 0 2
item041 item042 item043 item044 item045 item046 item047 item048 item049 item050
1 1 0 1 0 4 2 1 0 0
item051 ...391 total scores
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.