# EXAMPLE1: Default implementation generates the following
# 200 observations split into two clusters of equal size (100 observations each)
# Three variables-- one of each numeric, factor, and ordered
# Each variable has ten percent cluster overlap
# Nominal variable is binary
# Ordinal variable has four levels
df1 <- confactord()
# EXAMPLE2:
# 500 observations; 100 observations in cluster one and 400 in cluster two
# Three continuous variables, two nominal, one ordinal
# Only one continuous variable has cluster overlap
# All nominal and ordinal variables have cluster overlap
# Cluster overlap for continuous variable is twenty percent
# Cluster overlap for nominal variables are thirty percent
# Cluster overlap for ordinal variable is fourty percent
# Nominal variable has three levels, while ordinal has 5
df2 <- confactord(n = 500,
popProb = c(0.2,0.8),
numMixVar = c(3,2,1),
numMixVarOl = c(1,2,1),
olVarType = c(0.2,0.3,0.4),
catLevels = c(3,5))
Run the code above in your browser using DataLab