Description Usage Arguments Author(s) See Also Examples
This function returns a dichotomous matrix of simulated responses under given item and person parameters.
1 |
beta |
A numeric vector which contains the difficulty parameters for each item. |
alpha |
A numeric vector, which contains the slope parameters for each item. |
lowerA |
A numeric vector, which contains the lower asymptote parameters (kind of guessing parameter) for each item. |
upperA |
numeric vector, which contains the upper asymptote parameters for each item. |
theta |
A numeric vector which contains person parameters. |
Manuel Reif
sim_gpcm, PP_4pl
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 | ################# simulate 4PL ###############################################
set.seed(1700)
# simulate 1-PL model ----------
thetas <- c(0.231,-1.313,1.772,1.601,1.733,-2.001,0.443,3.111,-4.156)
sl <- c(1,1.1,0.9,0.89,1.5,1.1,1)
la <- c(0,0,0.2,0.15,0.04,0,0.21)
ua <- c(0.9,0.98,0.97,1,1,1,0.97)
simdat1pl <- sim_4pl(beta=seq(-4,4,length.out=7), alpha=rep(1,7),
lowerA=rep(0,7), upperA=rep(1,7), theta=thetas)
head(simdat1pl)
# simulate 2-PL model ----------
simdat2pl <- sim_4pl(beta=seq(-4,4,length.out=7), alpha=sl,
lowerA=rep(0,7), upperA=rep(1,7), theta=thetas)
head(simdat2pl)
# simulate 3-PL model ----------
simdat3pl <- sim_4pl(beta=seq(-4,4,length.out=7), alpha=sl,
lowerA=la, upperA=rep(1,7), theta=thetas)
head(simdat3pl)
# simulate 4-PL model ----------
simdat4pl <- sim_4pl(beta=seq(-4,4,length.out=7), alpha=sl,
lowerA=la, upperA=ua, theta=thetas)
head(simdat4pl)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.