# NOT RUN {
# 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))
# }
Run the code above in your browser using DataLab