generateScores: Generate a score for each item, based on the difficulty of...

Description Usage Arguments Value Examples

Description

Generate a score for each item, based on the difficulty of the item vs the theta ability level.

Usage

1
generateScores(item_pars, theta)

Arguments

item_pars

a matrix of doubles, items by params. Must have columns for $PAR_* matching the $MODEL

theta

a double. An ability level

Value

a vector integers. A score for each item based on the given theta ability

Examples

 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

yuehmeir2/CATSimulator documentation built on June 13, 2021, 7:02 p.m.