Learn R Programming

cacIRT (version 1.0)

sim: Simulate response data matrix from 3PL model

Description

modified from irtoys

Usage

sim(ip, x)

Arguments

ip
x

Value

    Examples

    Run this code
    ##---- Should be DIRECTLY executable !! ----
    ##-- ==>  Define data, use random,
    ##--	or do  help(data=index)  for the standard data sets.
    
    ## The function is currently defined as
    function(ip,x){
    	    i = irf(ip, x)
        	d = dim(i$f)
       		u = runif(d[1] * d[2])
        	dim(u) = d
        	return(ifelse(i$f > u, 1, 0))}

    Run the code above in your browser using DataLab