powered by
Generate (NxJ) categorical data matrix.
generate.onedata(N=100,J=5,Ktrue=3,q.vec=rep(3,5),noise.prop=0.3)
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.
The number of observations. Default is 100.
The number of active variables. Default is 5.
The number of true clusters. Default is 3.
A vector of length J giving the number of categories for each active variable. Default is rep(3,5).
A numeric value between 0 and 1 indicating the proportion of noise variables among J variables. Default is 0.3.
create.prop, generate.catecls
create.prop
generate.catecls
###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)
Run the code above in your browser using DataLab