Description Usage Arguments Value Author(s) Examples
In data genaration, determining the subgroup of each item belonging to through random number and Sigmoid Link function.
1 | 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
1 2 3 4 5 6 7 8 9 10 11 12 | #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)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.