View source: R/sim.raschtype.R
| sim.raschtype | R Documentation | 
This function simulates dichotomous item responses from a
generalized logistic item response model (Stukel, 1988).
The four-parameter logistic item response model
(Loken & Rulison, 2010) is a special case. See rasch.mml2
for more details.
sim.raschtype(theta, b, alpha1=0, alpha2=0, fixed.a=NULL,
    fixed.c=NULL, fixed.d=NULL)
| theta | Unidimensional ability vector  | 
| b | Vector of item difficulties  | 
| alpha1 | Parameter  | 
| alpha2 | Parameter  | 
| fixed.a | Vector of item slopes  | 
| fixed.c | Vector of lower item asymptotes  | 
| fixed.d | Vector of lower item asymptotes  | 
The class of generalized logistic link functions contain the most important link functions using the specifications (Stukel, 1988):
logistic link function: \alpha_1=0 and \alpha_2=0 
probit link function: \alpha_1=0.165 and \alpha_2=0.165 
loglog link function: \alpha_1=-0.037 and \alpha_2=0.62 
cloglog link function: \alpha_1=0.62 and \alpha_2=-0.037 
See pgenlogis for exact transformation formulas of
the mentioned link functions.
Data frame with simulated item responses
Loken, E., & Rulison, K. L. (2010). Estimation of a four-parameter item response theory model. British Journal of Mathematical and Statistical Psychology, 63, 509-525.
Stukel, T. A. (1988). Generalized logistic models. Journal of the American Statistical Association, 83, 426-431.
rasch.mml2, pgenlogis
#############################################################################
## EXAMPLE 1: Simulation of data from a Rasch model (alpha_1=alpha_2=0)
#############################################################################
set.seed(9765)
N <- 500    # number of persons
I <- 11     # number of items
b <- seq( -2, 2, length=I )
dat <- sirt::sim.raschtype( stats::rnorm( N ), b )
colnames(dat) <- paste0( "I", 1:I )
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.