get_thresh: Get Thurstone thresholds

Description Usage Arguments Value Examples

View source: R/helpers.R

Description

Find Thurstone thresholds from a fitted model.

Usage

1
get_thresh(pars, itemtype, item_ind, alpha = 1)

Arguments

pars

Vector of estimated item parameters

itemtype

Item type: "1PL", "PCM", or "PCM2".

item_ind

Vector with one element for each parameter indicating which item each parameter is associated with.

alpha

Vector of item steepnesses, with one element for each item. Recycled if of length 1.

Value

Vector of Thurstone thresholds

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
if(require(TAM)){

set.seed(2524)

diff <- rnorm(10)

N <- 500

th <- rnorm(N)

probs <- 1 / (1 + exp(-outer(th, diff, "-")))

dat <- apply(probs, 2, function(p) as.numeric(p > runif(N)))

# fit the model

mod <- TAM::tam.mml(resp = dat, irtmodel = "1PL")

get_thresh(mod$xsi$xsi, itemtype = "1PL", item_ind = 1:10)

}

scaleAlign documentation built on Aug. 10, 2020, 9:07 a.m.