generate_intercepts: Generating parameters of items - intercepts...

Description Usage Arguments Details Value See Also Examples

View source: R/generate_items_parameters.R

Description

Function generates a matrix of items' intercept (thresholds/difficulties) parameters.

Usage

1
2
3
4
5
6
7
8
generate_intercepts(
  nItems,
  scoringMatrix,
  FUNd,
  argsd = NULL,
  FUNt = NULL,
  argst = NULL
)

Arguments

nItems

number of items for which intercepts will be generated

scoringMatrix

scoring matrix that will be used for the generated items, specifically generated with make_scoring_matrix_aem or make_scoring_matrix_trivial

FUNd

function that will be used to generate item difficulties,h typically Uniform, Normal or rtruncnorm

argsd

list of arguments to be passed to FUNd

FUNt

optionally function that will be used to generate item thresholds (i.e. difficulties of categories relative to difficulty of the whole item), assuming simultaneous item responding process; typically Uniform, Normal or rtruncnorm; if not set item responding process is assumed to be a sequential one;

argst

optionally list of arguments to be passed to FUNt

Details

Assuming sequential response process:

Assuming sequential response process test item must be characterized by a set of intercept parameters describing individual thresholds of binary pseudo-items modeling consecutive decisions in the assumed sequence of responding process. In such a case:

Be aware that in this case values in rows of the returned matrix need not be ordered (as they describe different pseudo-items).

Assuming simultaneous response process:

Assuming simultaneous response process test item must be characterized by a set of intercept parameters describing difficulty of transition between consecutive categories of the response scale. It is convenient to define such intercepts generating process as a two-step procedure: 1) generate general difficulties of the whole items and only then 2) for each item generate values of thresholds relatively to the item difficulty, imposing identifiability assumption that these values must sum up to 0. Consequently in such a case:

Returned intercepts are sums of the general items' difficulty and values of the relative thresholds generated for these items.

Value

Matrix of nItems rows and number of columns equal to the number of intercepts.

See Also

generate_slopes, make_test

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
# 5 items with 5-point response scale assuming "sequential" item response
# process with "pseudo-items" intercepts sampled from a uniform distribution
# with limits +-1.5
sM <- make_scoring_matrix_aem(5, sequence = "mae")
generate_intercepts(5, sM, runif, list(min = -1.5, max = 1.5))
# 10 items with 5-point response scale assuming "sequential" item response
# process with "pseudo-items" intercepts sampled from a normal distribution
# with the mean of 0 and the standard deviation of 1.5
sM <- make_scoring_matrix_aem(5, sequence = "mae")
generate_intercepts(5, sM, rnorm, list(mean = 0, sd = 1))
# 10 items with 5-point response scale assuming "sequential" item response
# process with "pseudo-items" intercepts sampled from a uniform distribution
# with limits set to:
# trait 'm' (i.e. the first column in the scoring matrix): from -3 to -1
# trait 'a' (i.e. the second column in the scoring matrix): from -1 to 1
# trait 'e' (i.e. the third column in the scoring matrix): from 1 to 3
sM <- make_scoring_matrix_aem(5, sequence = "mae")
generate_intercepts(10, sM, runif,
                    list(min = c(-3, -1, 1),
                         max = c(-1, 1, 3)))

sM <- make_scoring_matrix_aem(6, sequence = "simultaneous")
# 10 items with 6-point response scale assuming "simultaneous" item response
# process with items difficulties sampled from a normal distribution with
# the mean of 0 and the standard deviation of 1.5 and thresholds relative
# to the items difficulties sampled from a uniform distribution with
# the limits of +-2
sM <- make_scoring_matrix_aem(6, sequence = "simultaneous")
generate_intercepts(10, sM,
                    FUNd = rnorm, argsd = list(mean = 0, sd = 1.5),
                    FUNt = runif, argst = list(min = -2, max = 2))
# 5 items with 6-point response scale assuming "simultaneous" item response
# process with items difficulties sampled from a uniform distribution with
# the limits of +-2 and thresholds relative to the items difficulties sampled
# from a normal distribution with the mean of 0 and the standard deviation
# defined individually for each item
# the limits of +-2
sM <- make_scoring_matrix_aem(6, sequence = "simultaneous")
generate_intercepts(5, sM,
                    FUNd = runif, argsd = list(min = -2, max = 2),
                    FUNt = rnorm, argst = list(mean = 0,
                                               sd = c(1, 1.2, 1.4, 1.6, 1.9)))
# 20 items with 5-point response scale assuming "simultaneous" item response
# process with items difficulties sampled from a uniform distribution with
# the limits of +-2 and thresholds relative to the items difficulties
# generated deterministically as a sequence of 4 regularly spaced values
# from 0.9 to -0.9
sM <- make_scoring_matrix_aem(5, sequence = "simultaneous")
generate_intercepts(20, sM,
                    FUNd = runif, argsd = list(min = -2, max = 2),
                    FUNt = seq, argst = list(from = 0.9,
                                             to = -0.9,
                                             length.out = 4))

rstyles documentation built on July 23, 2021, 5:07 p.m.