Description Usage Arguments Details Value Examples
Generate a random patttern of dichotomous responses for an attitude test.
1 2 3 |
hits |
Numerical vector of correct responses. |
x.min |
Minimum observable value. |
x.max |
Maximum observable value. |
p |
Probability of correct responses representing the ability of the subject. |
incr.diff |
Logical value. When |
time.limit |
Logical value indicating if the responses are done under time pressure. |
floor |
Logical value. If |
ceiling |
Logical value. If |
seed |
Numerical value to use as seed to generate pseurorandom values. |
The function simulates a response pattern of a subject to an attitude test. This hypothetical test consist on a set of alternatives in which, for each trial, one alternative is right and the others are wrong.
A list
object in which the first element (pattern
) contains the simulated responses
and the second element (score
) indicates if each response is correct (1) or uncorrect (0).
1 2 3 4 5 6 7 8 9 | # Simulation of responses for a test with fifteen items
# and four response alternatives (coded from 1 to 4).
# -> vector of correct responses:
correct <- c(1, 2, 1, 3, 3, 4, 3, 2, 1, 2, 2, 2, 4, 1, 4)
# -> simulation:
sim.attitude(correct, seed=16)
# -> simulation with time pressure:
sim.attitude(correct, p=0.7, time.limit=TRUE, seed=46)
# (NAs represent missed responses, which are considered wrong)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.