search for: cpprcode

Displaying 1 result from an estimated 1 matches for "cpprcode".

Did you mean: app_code
2011 Oct 24
3
Create a matrix with increment and element with zero subscript
...,nitems,(ncat-1)) + d<-( sigma_d*draw ) + mu_d + draw<-matrix(rtnorm((nitems*(ncat-1)),mean = seed1, sd = seed2, lower = .1, upper = 1.5),nitems,(ncat-1)) + d<-(sigma_d*draw) + mu_d + write.matrix(cbind(b.i0,d), file = "F:/KU/MIRT group/MIMIC-DIF/R/cpprcode/b0d.dat", sep = " ") + b[i,j]<-b[i,j-1]+d[i,j] + } + } The error as following: Error in b[i, j ] <- b[i, j - 1] + d[i, j] : replacement has length zero I would like to to have a matrix where the first column takes from initial pre-as...