search for: zairul

Displaying 2 results from an estimated 2 matches for "zairul".

Did you mean: hairul
2011 Oct 24
3
Create a matrix with increment and element with zero subscript
Hello, Does anyone knows how to deal with zero subscript in R. I have this code: for (i in 1:nitems){ + for (j in 1:ncat-1) { + draw<-matrix(rnorm(nitems*(ncat-1),seed1,seed2),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)) +
2011 Nov 05
1
set seed for random draws
Hello, all! I need help on these two problems: 1) If I want to randomly draw numbers from standard normal (or other distributions) in loops e.g.: ty=0; ks=0 for (i in 1:5) { set.seed(14537+i) k<-rnorm(1) ks[i]<-.3*k+.9 if (ty==0) { while ((ks<.2)||(ks>3)) { #set.seed(13237+i*100) k<-rnorm(1)