Dear all:

I have simulated ability(500 examinees) and difficulty(40 items).
as:
N <- 500
theta <- rnorm( N )
I <- 40
b <- seq( -2 , 2 , len=I )
p1 <- plogis( outer( theta, b, "-" ) )

I want to simulate 10 responses matrix
through this syntax: respR <- 1 * ( p1 > matrix( runif( N*I ) , nrow=N ,
ncol=I ) )

I tried this:
n<-10
respR<-list()
for(i in 1:n){
  respR[[i]] <- 1 * ( p1 > matrix( runif( N*I ) , nrow=N , ncol=I ) )
}

but I didn't get 10 respR matrix, such as: respR[[1]], respR[[2]].....

please help me to resolve that.

thanks!

	[[alternative HTML version deleted]]

