Ggenerate: Subgroup Determination

Description Usage Arguments Value Author(s) Examples

View source: R/Ggenerate.R

Description

In data genaration, determining the subgroup of each item belonging to through random number and Sigmoid Link function.

Usage

1
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

 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)

EMSNM documentation built on May 2, 2019, 1:41 p.m.