Ggenerate {EMSNM} | R Documentation |
In data genaration, determining the subgroup of each item belonging to through random number and Sigmoid Link function.
Ggenerate(eta, X, seed = 0)
eta |
the coeffients determining subgroup |
X |
the covariables determining subgroup |
seed |
random seed |
the classes items belonging to, it's a vector. If X1 belongs to class 3, then the 1st row 3rd colmn is 1 and the rest of 1st row are 0.
Linsui Deng
#some variables samplesize <- 1000 classsize <- 6 etasize <- 3 alphasize <- 2 #test of Ggenerate Xtest <- data.frame(matrix(rnorm(samplesize*etasize),samplesize,etasize)) etatest <- matrix(seq(1.15,1,length=etasize*classsize),etasize,classsize) Gtest1 <- Ggenerate(etatest,Xtest) Gtest2 <- Ggenerate(etatest,Xtest,1)