Wgenerate: Sigmoid Logistic Data Generation

Description Usage Arguments Value Author(s) Examples

View source: R/Wgenerate.R

Description

Generate data satisties Sigmoid Logistic Model to check EMalgorithm.

Usage

1
Wgenerate(alpha, sigma = 1, eta, samplesize = 0, X, Z, seed1 = 0, seed2 = 0)

Arguments

alpha

the coeffients of the mean of each subgroup

sigma

the variance of Y

eta

the coeffients determining subgroup

samplesize

the size of sample you wanna generate

X

the covariables of the mean of each subgroup

Z

the covaraibles determining subgroup

seed1

random seed of generating Y

seed2

random seed of generating G

Value

X

the covariables of the mean of each subgroup

Z

the covaraibles determining subgroup

Y

the generated respond variable

G

the classes items belonging to

Author(s)

Linsui Deng

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
#some variables
samplesize <- 1000
classsize <- 6
etasize <- 3
alphasize <- 2

#test of Wgenerate
Xtest <- data.frame(matrix(rnorm(samplesize*etasize),samplesize,etasize))
Ztest <- matrix(rnorm(samplesize*alphasize),samplesize,alphasize)

etatest <- matrix(seq(1.15,1,length=etasize*classsize),etasize,classsize)
alphatest <- matrix(seq(1.15,1,length=alphasize*classsize),alphasize,classsize)

Wtest <- Wgenerate(alpha=alphatest,eta=etatest,X=Xtest,Z=Ztest)

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