Ggenerate {EMSNM} | R Documentation |
Subgroup Determination
Description
In data genaration, determining the subgroup of each item belonging to through random number and Sigmoid Link function.
Usage
Ggenerate(eta, X, seed = 0)
Arguments
eta |
the coeffients determining subgroup |
X |
the covariables determining subgroup |
seed |
random seed |
Value
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.
Author(s)
Linsui Deng
Examples
#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)
[Package EMSNM version 1.0 Index]