Wgenerate {EMSNM}R Documentation

Sigmoid Logistic Data Generation

Description

Generate data satisties Sigmoid Logistic Model to check EMalgorithm.

Usage

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

#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)

[Package EMSNM version 1.0 Index]