generate.onedata {mccca}R Documentation

Generate (NxJ) categorical data matrix.

Description

Generate (NxJ) categorical data matrix.

Usage

generate.onedata(N=100,J=5,Ktrue=3,q.vec=rep(3,5),noise.prop=0.3)

Arguments

N

The number of observations. Default is 100.

J

The number of active variables. Default is 5.

Ktrue

The number of true clusters. Default is 3.

q.vec

A vector of length J giving the number of categories for each active variable. Default is rep(3,5).

noise.prop

A numeric value between 0 and 1 indicating the proportion of noise variables among J variables. Default is 0.3.

Value

Returns a list with the following elements.

data.mat

A (NxJ) data frame of categorical data.

clstr0.vec

A vector of integers (from 1:Ktrue) length N giving the cluster to which each observation is allocated.

See Also

create.prop, generate.catecls

Examples

###data setting
N <- 30 ; J <- 10 ; Ktrue <- 2 ; q.vec <- rep(5,J) ; noise.prop <- 0.3
datagene <- generate.onedata(N=N,J=J,Ktrue=Ktrue,q.vec=q.vec,noise.prop = noise.prop)

[Package mccca version 1.1.0.1 Index]