Description Usage Arguments Details Value Examples
Function makes a list object representing test items given
matrices of slopes and intercepts/thresholds parameters. Result may be used
within a call to generate_test_responses
.
1 2 3 4 5 6 7 8 9 |
scoringMatrix |
scoring matrix that should be used for items,
especially one generated with |
slopes |
matrix of slope parameters (items in rows, traits in cols),
especially generated with |
intercepts |
matrix of intercept parameters (items in rows,
intercepts/thresholds in cols), especially generated with
|
mode |
a way the item should be answered - see
|
scoringOnPreviousResponses |
optional function returning a column vector
that will be put before first column of the |
editResponse |
only if |
names |
optional character vector providing names of the items (by default names will be created as concatenation of the letter "i" - like "item" - and consecutive integers) |
Function is actually a simple wrapper around make_item
- see documentation of this function for further details.
Column names of the intercepts
matrix:
If mode = "simultaneous"
names should be of the form:
dN where d stands for itself and N are
consecutive integers from 1 to one less than the number of rows of
the the scoring matrix.
If mode = "sequential"
names should be of the form:
traitN where trait are names of traits - the same as
those in columns of the scoring matrix - and N are
integers describing consecutive thresholds of a pseudo-item
representing the given trait. In the most typical case with binary
pseudo-items this should be simply "1" (with in one column for
each trait) but polytomous pseudo-items need to be represented
by the number of columns less by one than the number of possible
responses, with N being consecutive integers.
List of objects of the rstylesItem class.
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 | ################################################################################
# responses to 10 items using 5-point Likert scale
# with respect to the Bockenholt's IRTree (i.e. "sequential") "MAE" model
# 1) make scoring matrix
sM <- make_scoring_matrix_aem(5, "mae")
# 2) generate items' slopes:
# slopes on the 'middle" and "extreme" latent traits set to 1 for all items
# and slopes on the "acquiescence" latent trait generated from a log-normal
# distribution with expected value of about 1.02 and standard deviation of
# about 0.21
slopes <- cbind(generate_slopes(10, sM[, 1, drop = FALSE], 1),
generate_slopes(10, sM[, 2, drop = FALSE], FUN = rlnorm,
meanlog = 0,
sdlog = 0.2),
generate_slopes(10, sM[, 3, drop = FALSE], 1))
# 3) generate items' intercepts:
# intercepts generated from the uniform distribution with limits set to
# -1.5 and 1.5
intercepts <- generate_intercepts(10, sM, runif,
list(min = -1.5,
max = 1.5))
# 4) call `make_test()`
# (for IRTree mode must be set to "sequential")
test <- make_test(sM, slopes, intercepts, "sequential")
################################################################################
# responses to 20 items using 5-point Likert scale
# with respect to the Plieninger's "simultaneous" (partialy-compensatory) model
# 1) make scoring matrix
sM <- make_scoring_matrix_aem(5, "simultaneous")
# 2) generate items' slopes:
# slopes on the 'middle", "extreme" and "acquiescence" latent traits
# set to 1 for all items and slopes on the "intensity" latent trait generated
# from a normal distribution with expected value of 1 and standard deviation
# of 0.3
slopes <- cbind(generate_slopes(20, sM[, 1, drop = FALSE], FUN = rnorm,
mean = 1, sd = 0.3),
generate_slopes(20, sM[, -1], 1))
# 3) generate items' thresholds:
# thresholds generated from the normal distributon of items' (general)
# diificulty wit expected value of 0 and standardo deviation of 1.5 and the
# uniform distribution with limits -1 and 1 of categories' thresholds
# relative to item's difficulty
intercepts <- generate_intercepts(20, sM, FUNd = rnorm, FUNt = runif,
argsd = list(mean = 0, sd = 1.5),
argst = list(min = -1, max = 1))
# 4) call `make_test()`
test <- make_test(sM, slopes, intercepts, "simultaneous")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.